Cleaner ListItem initialization (#117)

Should fix Coverity report CIDs 1516434 and 1518460.
This commit is contained in:
JosiahWI 2022-07-07 14:44:15 -05:00 committed by GitHub
parent 6db035e0aa
commit b787ec3e3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,20 +132,16 @@ namespace gui
struct ListItem struct ListItem
{ {
ListItem() : Icon(-1)
{}
core::stringw Text; core::stringw Text;
s32 Icon; s32 Icon = -1;
// A multicolor extension // A multicolor extension
struct ListItemOverrideColor struct ListItemOverrideColor
{ {
ListItemOverrideColor() : Use(false) {} bool Use = false;
bool Use;
video::SColor Color; video::SColor Color;
}; };
ListItemOverrideColor OverrideColors[EGUI_LBC_COUNT]; ListItemOverrideColor OverrideColors[EGUI_LBC_COUNT]{};
}; };
void recalculateItemHeight(); void recalculateItemHeight();