[Scummvm-git-logs] scummvm master -> a8cbc03acced1c382113825b1708c93edb61d28f
wjp
wjp at usecode.org
Sun Feb 26 22:45:21 CET 2017
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:
a8cbc03acc CRYO: Improve macro safety
Commit: a8cbc03acced1c382113825b1708c93edb61d28f
https://github.com/scummvm/scummvm/commit/a8cbc03acced1c382113825b1708c93edb61d28f
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2017-02-26T22:45:03+01:00
Commit Message:
CRYO: Improve macro safety
Changed paths:
engines/cryo/eden.cpp
diff --git a/engines/cryo/eden.cpp b/engines/cryo/eden.cpp
index ead3131..84b976a 100644
--- a/engines/cryo/eden.cpp
+++ b/engines/cryo/eden.cpp
@@ -6544,8 +6544,8 @@ void EdenGame::loadgame(char *name) {
}
#define NULLPTR 0xFFFFFF
-#define IDXOUT(val, base, typ, idx) if (val) (idx) = ((byte*)val - (byte*)base) / sizeof(typ); else (idx) = NULLPTR;
-#define OFSIN(val, base, typ) if ((void*)(val) != NULLPTR) (val) = (typ*)((char*)(val) + (size_t)(base)); else (val) = 0;
+#define IDXOUT(val, base, typ, idx) do { if (val) (idx) = ((byte*)val - (byte*)base) / sizeof(typ); else (idx) = NULLPTR; } while (false)
+#define OFSIN(val, base, typ) do { if ((void*)(val) != NULLPTR) (val) = (typ*)((char*)(val) + (size_t)(base)); else (val) = 0; } while (false)
void EdenGame::syncGlobalPointers(Common::Serializer s) {
uint32 dialogIdx, nextDialogIdx, narratorDialogIdx, lastDialogIdx, tapeIdx, nextRoomIconIdx, roomIdx;
More information about the Scummvm-git-logs
mailing list