[Scummvm-git-logs] scummvm master -> 5d0e6e7bb5f7e31d5da8bf0a41acf56dc835fc71

digitall noreply at scummvm.org
Wed Jun 22 00:41:37 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:
5d0e6e7bb5 GRAPHICS: MACGUI: Remove Invalid Check of this against NULL


Commit: 5d0e6e7bb5f7e31d5da8bf0a41acf56dc835fc71
    https://github.com/scummvm/scummvm/commit/5d0e6e7bb5f7e31d5da8bf0a41acf56dc835fc71
Author: D G Turner (digitall at scummvm.org)
Date: 2022-06-22T01:38:51+01:00

Commit Message:
GRAPHICS: MACGUI: Remove Invalid Check of this against NULL

The object's self reference of "this" can never be null, thus this
generates a GCC compiler warning when -Wnonnull-compare is passed.

Changed paths:
    graphics/macgui/macmenu.cpp


diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp
index d7a004693d4..ea9c3ba8264 100644
--- a/graphics/macgui/macmenu.cpp
+++ b/graphics/macgui/macmenu.cpp
@@ -311,9 +311,7 @@ int MacMenu::numberOfMenus() {
 
 MacMenuItem *MacMenu::getMenuItem(const Common::String &menuId) {
 	MacMenuItem *menu = nullptr;
-	if (!this) {
-		return menu;
-	}
+
 	for (uint i = 0; i < _items.size(); i++) {
 		// TODO: support unicode text menu
 		// didn't support unicode item finding yet




More information about the Scummvm-git-logs mailing list