aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2015-11-16 18:51:33 -0500
committerPaul Gilbert2015-11-16 18:51:33 -0500
commite3f81c267b5ef08838734baa31e84bec9ee7fb3d (patch)
tree1ab0435ba7849f8586fa53ce149d102d81aee7ee /engines
parentd388981714e8d58d321f42ea67907f59267268f7 (diff)
downloadscummvm-rg350-e3f81c267b5ef08838734baa31e84bec9ee7fb3d.tar.gz
scummvm-rg350-e3f81c267b5ef08838734baa31e84bec9ee7fb3d.tar.bz2
scummvm-rg350-e3f81c267b5ef08838734baa31e84bec9ee7fb3d.zip
SHERLOCK: RT: Fix Coverity warning in original savegame dialog
Diffstat (limited to 'engines')
-rw-r--r--engines/sherlock/tattoo/widget_files.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/engines/sherlock/tattoo/widget_files.cpp b/engines/sherlock/tattoo/widget_files.cpp
index 0f5e6793c4..ca5e1bff93 100644
--- a/engines/sherlock/tattoo/widget_files.cpp
+++ b/engines/sherlock/tattoo/widget_files.cpp
@@ -143,19 +143,17 @@ void WidgetFiles::render(FilesRenderMode mode) {
int yp = _surface.fontHeight() + 14;
for (int idx = _savegameIndex; idx < (_savegameIndex + FILES_LINES_COUNT); ++idx) {
- if (OP_NAMES || idx == _selector || idx == _oldSelector) {
- if (idx == _selector && mode != RENDER_ALL)
- color = COMMAND_HIGHLIGHTED;
- else
- color = INFO_TOP;
+ if (idx == _selector && mode != RENDER_ALL)
+ color = COMMAND_HIGHLIGHTED;
+ else
+ color = INFO_TOP;
- if (mode == RENDER_NAMES_AND_SCROLLBAR)
- _surface.fillRect(Common::Rect(4, yp, _surface.w() - BUTTON_SIZE - 9, yp + _surface.fontHeight()), TRANSPARENCY);
+ if (mode == RENDER_NAMES_AND_SCROLLBAR)
+ _surface.fillRect(Common::Rect(4, yp, _surface.w() - BUTTON_SIZE - 9, yp + _surface.fontHeight()), TRANSPARENCY);
- Common::String numStr = Common::String::format("%d.", idx + 1);
- _surface.writeString(numStr, Common::Point(_surface.widestChar(), yp), color);
- _surface.writeString(_savegames[idx], Common::Point(xp, yp), color);
- }
+ Common::String numStr = Common::String::format("%d.", idx + 1);
+ _surface.writeString(numStr, Common::Point(_surface.widestChar(), yp), color);
+ _surface.writeString(_savegames[idx], Common::Point(xp, yp), color);
yp += _surface.fontHeight() + 1;
}