[Scummvm-git-logs] scummvm master -> c99f548212fcf7c9aac9af280bb5cd20a36555a3

digitall noreply at scummvm.org
Sat May 28 15:33:28 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
c99f548212 GUI: Fix Set But Unused Variable Compiler Warnings in List Widgets


Commit: c99f548212fcf7c9aac9af280bb5cd20a36555a3
    https://github.com/scummvm/scummvm/commit/c99f548212fcf7c9aac9af280bb5cd20a36555a3
Author: D G Turner (digitall at scummvm.org)
Date: 2022-05-28T16:33:00+01:00

Commit Message:
GUI: Fix Set But Unused Variable Compiler Warnings in List Widgets

Changed paths:
    gui/widgets/groupedlist.cpp
    gui/widgets/list.cpp


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];




More information about the Scummvm-git-logs mailing list