Use designatet initializers for AppHooks

CppCheck wasn't able to handle `{0}`. C++20 allows to use designated
initializers.
This commit is contained in:
phosit 2025-11-20 18:58:44 +01:00
parent 3c9b4b922e
commit b17c2fb80f
No known key found for this signature in database
GPG key ID: C9430B600671C268

View file

@ -208,10 +208,11 @@ void InitVfs(const CmdLineArgs& args)
psSetLogDir(logs);
// desired location for crashlog is now known. update AppHooks ASAP
// (particularly before the following error-prone operations):
AppHooks hooks = {0};
hooks.bundle_logs = psBundleLogs;
hooks.get_log_dir = psLogDir;
hooks.display_error = psDisplayError;
AppHooks hooks{
.get_log_dir = psLogDir,
.bundle_logs = psBundleLogs,
.display_error = psDisplayError
};
app_hooks_update(&hooks);
g_VFS = CreateVfs();