[Scummvm-git-logs] scummvm master -> 896484600b6fd9015f7a2f77dd066bf048a99d00
digitall
noreply at scummvm.org
Sat Jun 3 15:58:50 UTC 2023
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
859b2dfd11 MM: MM1: Fix Unused Variable GCC Compiler Warning
896484600b MM: MM1: Fix Duplicated Code Branches GCC Compiler Warning
Commit: 859b2dfd11925292b718966574a07ac2e7287242
https://github.com/scummvm/scummvm/commit/859b2dfd11925292b718966574a07ac2e7287242
Author: D G Turner (digitall at scummvm.org)
Date: 2023-06-03T16:56:51+01:00
Commit Message:
MM: MM1: Fix Unused Variable GCC Compiler Warning
Changed paths:
engines/mm/mm1/views/text_entry.cpp
diff --git a/engines/mm/mm1/views/text_entry.cpp b/engines/mm/mm1/views/text_entry.cpp
index 2a09af8e6ca..40f6414b33d 100644
--- a/engines/mm/mm1/views/text_entry.cpp
+++ b/engines/mm/mm1/views/text_entry.cpp
@@ -56,8 +56,6 @@ void TextEntry::drawText() {
}
bool TextEntry::msgKeypress(const KeypressMessage &msg) {
- Common::KeyCode kc = msg.keycode;
-
if (msg.keycode == Common::KEYCODE_BACKSPACE &&
!_text.empty()) {
_text.deleteLastChar();
Commit: 896484600b6fd9015f7a2f77dd066bf048a99d00
https://github.com/scummvm/scummvm/commit/896484600b6fd9015f7a2f77dd066bf048a99d00
Author: D G Turner (digitall at scummvm.org)
Date: 2023-06-03T16:57:10+01:00
Commit Message:
MM: MM1: Fix Duplicated Code Branches GCC Compiler Warning
The ScrollView::draw method was just calling the parent class of PartyView
so code that selects between this i.e. in combat or not, gave a GCC warning
as both paths were identical. This fixes this warning and allows the
behaviour to be varied in future.
Changed paths:
engines/mm/mm1/views_enh/party_view.cpp
engines/mm/mm1/views_enh/party_view.h
diff --git a/engines/mm/mm1/views_enh/party_view.cpp b/engines/mm/mm1/views_enh/party_view.cpp
index ab3bb3a30be..64fe3ce877f 100644
--- a/engines/mm/mm1/views_enh/party_view.cpp
+++ b/engines/mm/mm1/views_enh/party_view.cpp
@@ -29,6 +29,12 @@ namespace MM {
namespace MM1 {
namespace ViewsEnh {
+void PartyView::draw() {
+ debug(11, "PartyView::draw()");
+
+ ScrollView::draw();
+}
+
bool PartyView::msgFocus(const FocusMessage &msg) {
// Turn on highlight for selected character
if (!g_globals->_currCharacter && selectCharByDefault())
diff --git a/engines/mm/mm1/views_enh/party_view.h b/engines/mm/mm1/views_enh/party_view.h
index 07331d4ffd6..e665fc4e1cc 100644
--- a/engines/mm/mm1/views_enh/party_view.h
+++ b/engines/mm/mm1/views_enh/party_view.h
@@ -63,6 +63,7 @@ public:
ScrollView(name, owner) {}
virtual ~PartyView() {}
+ void draw() override;
bool msgFocus(const FocusMessage &msg) override;
bool msgUnfocus(const UnfocusMessage &msg) override;
bool msgMouseDown(const MouseDownMessage &msg) override;
More information about the Scummvm-git-logs
mailing list