From 30c366ee5db4c27e9d0ef94fd5786af55b1b0147 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 3 Oct 2019 06:03:46 +0100 Subject: GUI: Add Missing Switch Default Cases These are flagged by GCC if -Wswitch-default is enabled. --- gui/console.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'gui/console.cpp') diff --git a/gui/console.cpp b/gui/console.cpp index a47f5b9afd..41b7a73379 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -489,12 +489,16 @@ void ConsoleDialog::insertIntoPrompt(const char* str) { void ConsoleDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { switch (cmd) { case kSetPositionCmd: - int newPos = (int)data + _linesPerPage - 1 + _firstLineInBuffer; - if (newPos != _scrollLine) { - _scrollLine = newPos; - g_gui.scheduleTopDialogRedraw(); + { + int newPos = (int)data + _linesPerPage - 1 + _firstLineInBuffer; + if (newPos != _scrollLine) { + _scrollLine = newPos; + g_gui.scheduleTopDialogRedraw(); + } } break; + default: + break; } } -- cgit v1.2.3