@@ -165,6 +165,7 @@ static void parse_gamma_func()
165165 error_display (0 , " %f is not a valid gamma value! (Invalid increment)" , value);
166166}
167167
168+ // coverity[GLOBAL_INIT_ORDER] -- safe; OptionBuilder::finish() uses Meyers singleton
168169static auto GammaOption __UNUSED = options::OptionBuilder<float >(" Graphics.Gamma" ,
169170 std::pair<const char *, int >{" Brightness" , 1375 },
170171 std::pair<const char *, int >{" The brightness value used for the game window" , 1738 })
@@ -199,6 +200,7 @@ const SCP_vector<std::pair<int, std::pair<const char*, int>>> DetailLevelValues
199200 { 3 , {" High" , 1162 }},
200201 { 4 , {" Ultra" , 1721 }}};
201202
203+ // coverity[GLOBAL_INIT_ORDER] -- safe; OptionBuilder::finish() uses Meyers singleton
202204const auto LightingOption __UNUSED = options::OptionBuilder<int >(" Graphics.Lighting" ,
203205 std::pair<const char *, int >{" Lighting" , 1367 },
204206 std::pair<const char *, int >{" Level of detail of the lighting" , 1715 })
@@ -252,6 +254,7 @@ static void parse_window_mode_func()
252254 }
253255}
254256
257+ // coverity[GLOBAL_INIT_ORDER] -- safe; OptionBuilder::finish() uses Meyers singleton
255258static auto WindowModeOption __UNUSED = options::OptionBuilder<os::ViewportState>(" Graphics.WindowMode" ,
256259 std::pair<const char *, int >{" Window Mode" , 1772 },
257260 std::pair<const char *, int >{" Controls how the game window is created" , 1773 })
@@ -271,6 +274,7 @@ void removeWindowModeOption()
271274 options::OptionsManager::instance ()->removeOption (WindowModeOption);
272275}
273276
277+ // coverity[GLOBAL_INIT_ORDER] -- safe; Hook::Factory() uses Meyers singleton
274278const std::shared_ptr<scripting::OverridableHook<>> OnFrameHook = scripting::OverridableHook<>::Factory(
275279 " On Frame" , " Called every frame as the last action before showing the frame result to the user." , {}, std::nullopt , CHA_ONFRAME);
276280
@@ -354,6 +358,7 @@ static bool videodisplay_change(int display, bool initial)
354358// Video display cannot support default settings because graphics have not been
355359// initialized so we can't validate the setting. But also, this should probably
356360// only ever be a user setting
361+ // coverity[GLOBAL_INIT_ORDER] -- safe; OptionBuilder::finish() uses Meyers singleton
357362static auto VideoDisplayOption = options::OptionBuilder<int >(" Graphics.Display" ,
358363 std::pair<const char *, int >{" Primary display" , 1741 },
359364 std::pair<const char *, int >{" The display used for rendering" , 1742 })
@@ -490,6 +495,7 @@ static bool resolution_vr_change(const ResolutionInfo& /*info*/, bool initial)
490495// Resolution cannot support default settings because graphics have not been
491496// initialized so we can't validate the setting. But also, this should probably
492497// only ever be a user setting
498+ // coverity[GLOBAL_INIT_ORDER] -- safe; OptionBuilder::finish() uses Meyers singleton
493499static auto ResolutionOption = options::OptionBuilder<ResolutionInfo>(" Graphics.Resolution" ,
494500 std::pair<const char *, int >{" Resolution" , 1748 },
495501 std::pair<const char *, int >{" The rendering resolution" , 1749 })
@@ -509,6 +515,7 @@ void removeResolutionOption()
509515 options::OptionsManager::instance ()->removeOption (ResolutionOption);
510516}
511517
518+ // coverity[GLOBAL_INIT_ORDER] -- safe; OptionBuilder::finish() uses Meyers singleton
512519static auto ResolutionVROption = options::OptionBuilder<ResolutionInfo>(" Graphics.ResolutionVR" ,
513520 std::pair<const char *, int >{" VR Resolution" , 1878 },
514521 std::pair<const char *, int >{" The rendering resolution when in VR mode" , 1879 })
@@ -537,6 +544,7 @@ static void parse_soft_particle_func() {
537544 Gr_enable_soft_particles = value;
538545}
539546
547+ // coverity[GLOBAL_INIT_ORDER] -- safe; OptionBuilder::finish() uses Meyers singleton
540548static auto SoftParticlesOption __UNUSED = options::OptionBuilder<bool >(" Graphics.SoftParticles" ,
541549 std::pair<const char *, int >{" Soft Particles" , 1761 },
542550 std::pair<const char *, int >{" Enable or disable soft particle rendering" , 1762 })
@@ -577,6 +585,7 @@ static void parse_framebuffer_func() {
577585 }
578586}
579587
588+ // coverity[GLOBAL_INIT_ORDER] -- safe; OptionBuilder::finish() uses Meyers singleton
580589static auto FramebufferEffectsOption __UNUSED = options::OptionBuilder<flagset<FramebufferEffects>>(" Graphics.FramebufferEffects" ,
581590 std::pair<const char *, int >{" Framebuffer effects" , 1732 },
582591 std::pair<const char *, int >{" Controls which framebuffer effects will be applied to the scene" , 1733 })
@@ -622,6 +631,7 @@ static void parse_anti_aliasing_func() {
622631 }
623632}
624633
634+ // coverity[GLOBAL_INIT_ORDER] -- safe; OptionBuilder::finish() uses Meyers singleton
625635static auto AAOption __UNUSED = options::OptionBuilder<AntiAliasMode>(" Graphics.AAMode" ,
626636 std::pair<const char *, int >{" Anti Aliasing" , 1752 },
627637 std::pair<const char *, int >{" Controls the anti aliasing mode of the engine." , 1753 })
@@ -669,6 +679,7 @@ static void parse_msaa_func()
669679 }
670680}
671681
682+ // coverity[GLOBAL_INIT_ORDER] -- safe; OptionBuilder::finish() uses Meyers singleton
672683static auto MSAAOption __UNUSED = options::OptionBuilder<int >(" Graphics.MSAASamples" ,
673684 std::pair<const char *, int >{" Multisample Anti Aliasing" , 1758 },
674685 std::pair<const char *, int >{" Controls whether multisample anti asliasing is enabled, and with how many samples" , 1759 })
@@ -701,6 +712,7 @@ static void parse_post_processing_func()
701712
702713bool Gr_post_processing_enabled = true ;
703714
715+ // coverity[GLOBAL_INIT_ORDER] -- safe; OptionBuilder::finish() uses Meyers singleton
704716static auto PostProcessOption __UNUSED = options::OptionBuilder<bool >(" Graphics.PostProcessing" ,
705717 std::pair<const char *, int >{" Post processing" , 1726 },
706718 std::pair<const char *, int >{" Controls whether post processing is enabled in the engine." , 1727 })
@@ -722,6 +734,7 @@ static void parse_vsync_func()
722734 Gr_enable_vsync = value;
723735}
724736
737+ // coverity[GLOBAL_INIT_ORDER] -- safe; OptionBuilder::finish() uses Meyers singleton
725738static auto VSyncOption __UNUSED = options::OptionBuilder<bool >(" Graphics.VSync" ,
726739 std::pair<const char *, int >{" Vertical Sync" , 1766 },
727740 std::pair<const char *, int >{" Controls how the engine does vertical synchronization" , 1767 })
0 commit comments