From d0099a6d790b66f21e4e266e569d64fb82fb0a81 Mon Sep 17 00:00:00 2001 From: Kai Blaschke Date: Mon, 19 Feb 2024 23:29:39 +0100 Subject: Fixed some uninitialized members May have caused undefined behavior in few cases, as most of the fixed members were used before being initialized. --- source/frontend/StarMainInterface.hpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'source/frontend/StarMainInterface.hpp') diff --git a/source/frontend/StarMainInterface.hpp b/source/frontend/StarMainInterface.hpp index adba4e6..91a63ab 100644 --- a/source/frontend/StarMainInterface.hpp +++ b/source/frontend/StarMainInterface.hpp @@ -154,11 +154,11 @@ private: void displayScriptPane(ScriptPanePtr& scriptPane, EntityId sourceEntity); - GuiContext* m_guiContext; + GuiContext* m_guiContext{nullptr}; MainInterfaceConfigConstPtr m_config; InterfaceCursor m_cursor; - RunningState m_state; + RunningState m_state{Running}; UniverseClientPtr m_client; WorldPainterPtr m_worldPainter; @@ -192,7 +192,7 @@ private: WirePanePtr m_wireInterface; ActionBarPtr m_actionBar; - Vec2I m_cursorScreenPos; + Vec2I m_cursorScreenPos{}; ItemSlotWidgetPtr m_cursorItem; Maybe m_cursorTooltip; @@ -201,29 +201,29 @@ private: GameTimer m_debugSpatialClearTimer; GameTimer m_debugMapClearTimer; - RectF m_debugTextRect; + RectF m_debugTextRect{RectF::null()}; NameplatePainterPtr m_nameplatePainter; QuestIndicatorPainterPtr m_questIndicatorPainter; ChatBubbleManagerPtr m_chatBubbleManager; - bool m_disableHud; + bool m_disableHud{false}; String m_lastCommand; LinkedList m_messages; HashMap> m_itemDropMessages; - unsigned m_messageOverflow; + unsigned m_messageOverflow{}; GuiMessagePtr m_overflowMessage; List>> m_queuedJoinRequests; - EntityId m_lastMouseoverTarget; + EntityId m_lastMouseoverTarget{NullEntityId}; GameTimer m_stickyTargetingTimer; - int m_portraitScale; + int m_portraitScale{}; - EntityId m_specialDamageBarTarget; - float m_specialDamageBarValue; + EntityId m_specialDamageBarTarget{NullEntityId}; + float m_specialDamageBarValue{}; ContainerInteractorPtr m_containerInteractor; }; -- cgit v1.2.3