From b787ec3e3e31bfbf6076a200c6b9819573288ca2 Mon Sep 17 00:00:00 2001 From: JosiahWI <41302989+JosiahWI@users.noreply.github.com> Date: Thu, 7 Jul 2022 14:44:15 -0500 Subject: [PATCH] Cleaner ListItem initialization (#117) Should fix Coverity report CIDs 1516434 and 1518460. --- source/Irrlicht/CGUIListBox.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/source/Irrlicht/CGUIListBox.h b/source/Irrlicht/CGUIListBox.h index 0742c0db..471e289e 100644 --- a/source/Irrlicht/CGUIListBox.h +++ b/source/Irrlicht/CGUIListBox.h @@ -132,20 +132,16 @@ namespace gui struct ListItem { - ListItem() : Icon(-1) - {} - core::stringw Text; - s32 Icon; + s32 Icon = -1; // A multicolor extension struct ListItemOverrideColor { - ListItemOverrideColor() : Use(false) {} - bool Use; + bool Use = false; video::SColor Color; }; - ListItemOverrideColor OverrideColors[EGUI_LBC_COUNT]; + ListItemOverrideColor OverrideColors[EGUI_LBC_COUNT]{}; }; void recalculateItemHeight();