Initialize member variables in Controller class for improved stability

This commit is contained in:
scawful
2024-12-31 17:41:47 -05:00
parent daad7a4731
commit 1a5d5befb9

View File

@@ -8,8 +8,8 @@
#include "absl/status/status.h" #include "absl/status/status.h"
#include "app/core/platform/renderer.h" #include "app/core/platform/renderer.h"
#include "app/core/utils/file_util.h" #include "app/core/utils/file_util.h"
#include "app/editor/editor_manager.h"
#include "app/editor/editor.h" #include "app/editor/editor.h"
#include "app/editor/editor_manager.h"
#include "imgui/backends/imgui_impl_sdl2.h" #include "imgui/backends/imgui_impl_sdl2.h"
#include "imgui/backends/imgui_impl_sdlrenderer2.h" #include "imgui/backends/imgui_impl_sdlrenderer2.h"
#include "imgui/imconfig.h" #include "imgui/imconfig.h"
@@ -58,9 +58,9 @@ class Controller : public ExperimentFlags {
private: private:
friend int ::main(int argc, char **argv); friend int ::main(int argc, char **argv);
bool active_; bool active_ = false;
Platform platform_; Platform platform_;
editor::Editor *test_editor_; editor::Editor *test_editor_ = nullptr;
editor::EditorManager editor_manager_; editor::EditorManager editor_manager_;
int audio_frequency_ = 48000; int audio_frequency_ = 48000;
@@ -70,7 +70,6 @@ class Controller : public ExperimentFlags {
}; };
} // namespace core } // namespace core
} // namespace yaze } // namespace yaze
#endif // YAZE_APP_CORE_CONTROLLER_H #endif // YAZE_APP_CORE_CONTROLLER_H