[Scummvm-git-logs] scummvm master -> c9fcf5e96f6e122967f7b7b32a472e0c85329285
digitall
547637+digitall at users.noreply.github.com
Wed Aug 4 16:26:59 UTC 2021
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:
c9fcf5e96f TWINE: Use STATIC_ASSERT macro rather than static_assert Keyword
Commit: c9fcf5e96f6e122967f7b7b32a472e0c85329285
https://github.com/scummvm/scummvm/commit/c9fcf5e96f6e122967f7b7b32a472e0c85329285
Author: D G Turner (digitall at scummvm.org)
Date: 2021-08-04T17:25:59+01:00
Commit Message:
TWINE: Use STATIC_ASSERT macro rather than static_assert Keyword
The keyword is C+-11 specific and is used by the macro in scummsys.h
when available in any case. This improves portability.
Changed paths:
engines/twine/debugger/console.cpp
engines/twine/shared.h
diff --git a/engines/twine/debugger/console.cpp b/engines/twine/debugger/console.cpp
index 4713a19f8b..40e3faf0a8 100644
--- a/engines/twine/debugger/console.cpp
+++ b/engines/twine/debugger/console.cpp
@@ -395,7 +395,7 @@ static const char *ItemNames[] = {
"BonusList",
"CloverLeaf"
};
-static_assert(ARRAYSIZE(ItemNames) == InventoryItems::MaxInventoryItems, "Array size doesn't match items");
+STATIC_ASSERT(ARRAYSIZE(ItemNames) == InventoryItems::MaxInventoryItems, "Array size doesn't match items");
bool TwinEConsole::doGiveItem(int argc, const char **argv) {
if (argc <= 1) {
diff --git a/engines/twine/shared.h b/engines/twine/shared.h
index 41519ea864..e14073212b 100644
--- a/engines/twine/shared.h
+++ b/engines/twine/shared.h
@@ -81,7 +81,7 @@ struct I16Vec3 {
int16 z = 0;
};
#include "common/pack-end.h"
-static_assert(sizeof(I16Vec3) == 6, "Unexpected pointTab size");
+STATIC_ASSERT(sizeof(I16Vec3) == 6, "Unexpected pointTab size");
struct IVec3 {
constexpr IVec3() : x(0), y(0), z(0) {}
More information about the Scummvm-git-logs
mailing list