mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-04 05:55:47 -07:00
Use designatet initializers for AppHooks
CppCheck wasn't able to handle `{0}`. C++20 allows to use designated
initializers.
This commit is contained in:
parent
3c9b4b922e
commit
b17c2fb80f
1 changed files with 5 additions and 4 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue