From 3a48b8e6cfc2e809c252020bf0e1b98999235ded Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Tue, 7 May 2024 14:25:29 +0200 Subject: [PATCH] Revert "Initialize all ghost item member (Closed #8297)" This reverts commit f319ed239ad27ceda928b9bcd399ca6c6379c88b. Initializing these variables with junk data doesn't seem to be an improvement over not initializing them. It hides potential Valgrind warnings about data accesses to uninitialized memory though. https://github.com/ddnet/ddnet/pull/8309/commits/f319ed239ad27ceda928b9bcd399ca6c6379c88b#r1590801501 --- src/game/client/components/menus.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/game/client/components/menus.h b/src/game/client/components/menus.h index 712aa6f17..c6ac773ef 100644 --- a/src/game/client/components/menus.h +++ b/src/game/client/components/menus.h @@ -700,11 +700,11 @@ public: char m_aFilename[IO_MAX_PATH_LENGTH]; char m_aPlayer[MAX_NAME_LENGTH]; - bool m_Failed = true; - int m_Time = 0; - int m_Slot = -1; - bool m_Own = false; - time_t m_Date = 0; + bool m_Failed; + int m_Time; + int m_Slot; + bool m_Own; + time_t m_Date; CGhostItem() : m_Slot(-1), m_Own(false) { m_aFilename[0] = 0; }