[Scummvm-git-logs] scummvm master -> f178b4c9fa6045904e9d552070507c8d9c25c822
orgads
noreply at scummvm.org
Thu Jun 2 20:34:57 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:
f178b4c9fa HADESCH: Remove pointless NULL validation
Commit: f178b4c9fa6045904e9d552070507c8d9c25c822
https://github.com/scummvm/scummvm/commit/f178b4c9fa6045904e9d552070507c8d9c25c822
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2022-06-02T23:34:39+03:00
Commit Message:
HADESCH: Remove pointless NULL validation
Reported by GCC 12:
../scummvm/engines/hadesch/gfx_context.cpp: In member function 'virtual void Hadesch::GfxContext8Bit::renderToScreen(Common::Point)':
../scummvm/engines/hadesch/gfx_context.cpp:97:13: warning: the address of 'Hadesch::GfxContext8Bit::_palette' will never be NULL [-Waddress]
97 | if (_palette) {
| ^~~~~~~~
In file included from ../scummvm/engines/hadesch/gfx_context.cpp:23:
../scummvm/engines/hadesch/gfx_context.h:62:14: note: 'Hadesch::GfxContext8Bit::_palette' declared here
62 | byte _palette[256 * 4];
| ^~~~~~~~
Changed paths:
engines/hadesch/gfx_context.cpp
diff --git a/engines/hadesch/gfx_context.cpp b/engines/hadesch/gfx_context.cpp
index 4c74780e029..b4177c15a3d 100644
--- a/engines/hadesch/gfx_context.cpp
+++ b/engines/hadesch/gfx_context.cpp
@@ -94,10 +94,7 @@ GfxContext8Bit::GfxContext8Bit(int canvasW, int canvasH) : surf(canvasW, canvasH
}
void GfxContext8Bit::renderToScreen(Common::Point viewPoint) {
- if (_palette) {
- g_system->getPaletteManager()->setPalette(_palette, 0, 256);
- }
-
+ g_system->getPaletteManager()->setPalette(_palette, 0, 256);
g_system->copyRectToScreen(surf.getBasePtr(viewPoint.x, viewPoint.y), surf.w, 0, 0,
kVideoWidth, kVideoHeight);
}
More information about the Scummvm-git-logs
mailing list