From c99f548212fcf7c9aac9af280bb5cd20a36555a3 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 28 May 2022 16:33:00 +0100 Subject: [PATCH] GUI: Fix Set But Unused Variable Compiler Warnings in List Widgets --- gui/widgets/groupedlist.cpp | 8 ++++++++ gui/widgets/list.cpp | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/gui/widgets/groupedlist.cpp b/gui/widgets/groupedlist.cpp index e74350f6c26..c9159570d50 100644 --- a/gui/widgets/groupedlist.cpp +++ b/gui/widgets/groupedlist.cpp @@ -268,7 +268,9 @@ void GroupedListWidget::drawWidget() { const int y = _y + _topPadding + kLineHeight * i; const int fontHeight = g_gui.getFontHeight(); ThemeEngine::TextInversionState inverted = ThemeEngine::kTextInversionNone; +#if 0 ThemeEngine::FontStyle bold = ThemeEngine::kFontStyleBold; +#endif // Draw the selected item inverted, on a highlighted background. if (_selectedItem == pos) @@ -280,7 +282,9 @@ void GroupedListWidget::drawWidget() { if (isGroupHeader(_listIndex[pos])) { int groupID = indexToGroupID(_listIndex[pos]); +#if 0 bold = ThemeEngine::kFontStyleBold; +#endif r.left += fontHeight + _leftPadding; g_gui.theme()->drawFoldIndicator(Common::Rect(_x + _hlLeftPadding + _leftPadding, y, _x + fontHeight + _leftPadding, y + fontHeight), _groupExpanded[groupID]); pad = 0; @@ -294,6 +298,7 @@ void GroupedListWidget::drawWidget() { pad = 0; } +#if 0 ThemeEngine::FontColor color = ThemeEngine::kFontColorNormal; if (!_listColors.empty()) { @@ -302,6 +307,7 @@ void GroupedListWidget::drawWidget() { else color = _listColors[_listIndex[pos]]; } +#endif Common::Rect r1(_x + r.left, y, _x + r.right, y + fontHeight); @@ -317,7 +323,9 @@ void GroupedListWidget::drawWidget() { if (_selectedItem == pos && _editMode) { buffer = _editString; +#if 0 color = _editColor; +#endif adjustOffset(); } else { buffer = _list[pos]; diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp index ed263ad9509..0685c0dbbf0 100644 --- a/gui/widgets/list.cpp +++ b/gui/widgets/list.cpp @@ -589,6 +589,7 @@ void ListWidget::drawWidget() { pad = 0; } +#if 0 ThemeEngine::FontColor color = ThemeEngine::kFontColorNormal; if (!_listColors.empty()) { @@ -597,6 +598,7 @@ void ListWidget::drawWidget() { else color = _listColors[_listIndex[pos]]; } +#endif Common::Rect r1(_x + r.left, y, _x + r.right, y + fontHeight); @@ -612,7 +614,9 @@ void ListWidget::drawWidget() { if (_selectedItem == pos && _editMode) { buffer = _editString; +#if 0 color = _editColor; +#endif adjustOffset(); } else { buffer = _list[pos];