aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosiahWI <41302989+JosiahWI@users.noreply.github.com>2022-07-07 14:44:15 -0500
committerGitHub <noreply@github.com>2022-07-07 21:44:15 +0200
commitb787ec3e3e31bfbf6076a200c6b9819573288ca2 (patch)
tree2a0a14c828a1de06119365996cec6019eb5ff3c0
parent6db035e0aaf0ff3528748837835e959fea16d1ef (diff)
downloadirrlicht-b787ec3e3e31bfbf6076a200c6b9819573288ca2.tar.xz
Cleaner ListItem initialization (#117)
Should fix Coverity report CIDs 1516434 and 1518460.
-rw-r--r--source/Irrlicht/CGUIListBox.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/source/Irrlicht/CGUIListBox.h b/source/Irrlicht/CGUIListBox.h
index 0742c0d..471e289 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();