[Scummvm-git-logs] scummvm master -> 3276c7d501c07cfb5db03712dcd6455673f28ad0
lephilousophe
noreply at scummvm.org
Wed Aug 28 15:11:26 UTC 2024
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:
3276c7d501 ENGINES: Fix global constructor warning
Commit: 3276c7d501c07cfb5db03712dcd6455673f28ad0
https://github.com/scummvm/scummvm/commit/3276c7d501c07cfb5db03712dcd6455673f28ad0
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2024-08-28T17:09:56+02:00
Commit Message:
ENGINES: Fix global constructor warning
I don't know why Clang (and GCC) creates a global constructor when we
use a global variable with a pointer.
Using an array instead seems to please both of them.
Changed paths:
engines/metaengine.cpp
engines/metaengine.h
diff --git a/engines/metaengine.cpp b/engines/metaengine.cpp
index 572bb2d39ae..6d8afe83d65 100644
--- a/engines/metaengine.cpp
+++ b/engines/metaengine.cpp
@@ -36,7 +36,7 @@
#include "graphics/managed_surface.h"
#include "graphics/thumbnail.h"
-const char *MetaEngineDetection::GAME_NOT_IMPLEMENTED = _s("Game not implemented");
+const char MetaEngineDetection::GAME_NOT_IMPLEMENTED[] = _s("Game not implemented");
Common::String MetaEngine::getSavegameFile(int saveGameIdx, const char *target) const {
if (!target)
diff --git a/engines/metaengine.h b/engines/metaengine.h
index 55bc08088fc..c2bd01a2b13 100644
--- a/engines/metaengine.h
+++ b/engines/metaengine.h
@@ -129,7 +129,7 @@ public:
* This is the message to use in detection tables when
* the game logic is not implemented
*/
- static const char *GAME_NOT_IMPLEMENTED;
+ static const char GAME_NOT_IMPLEMENTED[];
virtual ~MetaEngineDetection() {}
More information about the Scummvm-git-logs
mailing list