BASE: Fix Remaining Macro Definition Warnings

These are emitted by GCC when -Wundef is passed.

This could have caused odd behaviour if the WIN32 symbol was defined
as 0 i.e. #ifdef WIN32 code is included for compilation, but #if WIN32
guarded code is excluded, hence #ifdef is used in all cases as per the
existing compile time guards.
This commit is contained in:
D G Turner 2022-05-24 02:57:46 +01:00
parent 3eb2cf61e4
commit 3636af4035

View File

@ -1410,7 +1410,7 @@ static void calcMD5Mac(Common::Path &filePath, int32 length) {
// We need to split the path into the file name and a SearchSet
Common::SearchSet dir;
char nativeSeparator = '/';
#if WIN32
#ifdef WIN32
nativeSeparator = '\\';
#endif
Common::FSNode dirNode(filePath.getParent().toString(nativeSeparator));
@ -1755,7 +1755,7 @@ bool processSettings(Common::String &command, Common::StringMap &settings, Commo
Common::String filename = settings.getValOrDefault("md5-path", "scummvm");
// Assume '/' separator except on Windows if the path contain at least one `\`
char sep = '/';
#if WIN32
#ifdef WIN32
if (filename.contains('\\'))
sep = '\\';
#endif