diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-04-10 09:48:59 +0200 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-04-10 09:48:59 +0200 |
commit | 408f8a5bf7934e7a5aa113fd3a55899db70dd73a (patch) | |
tree | af1a63c4d5c81fe8b2f97ee32842fe89d2c457fe /src/macros_and_utils.h | |
parent | 8f75e0ff26645ced3669f600aa5e9133bb7b49af (diff) | |
download | lanes-408f8a5bf7934e7a5aa113fd3a55899db70dd73a.tar.gz lanes-408f8a5bf7934e7a5aa113fd3a55899db70dd73a.tar.bz2 lanes-408f8a5bf7934e7a5aa113fd3a55899db70dd73a.zip |
C++ migration: luaG_inter_copy_* now return an enum class instead of an anonymous int
Diffstat (limited to 'src/macros_and_utils.h')
-rw-r--r-- | src/macros_and_utils.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/macros_and_utils.h b/src/macros_and_utils.h index 31ae8bd..99e49f9 100644 --- a/src/macros_and_utils.h +++ b/src/macros_and_utils.h | |||
@@ -77,7 +77,7 @@ class StackChecker | |||
77 | if ((offset_ < 0) || (m_oldtop < 0)) | 77 | if ((offset_ < 0) || (m_oldtop < 0)) |
78 | { | 78 | { |
79 | assert(false); | 79 | assert(false); |
80 | std::ignore = luaL_error(m_L, "STACK INIT ASSERT failed (%d not %d): %s:%d", lua_gettop(m_L), offset_, file_, line_); | 80 | luaL_error(m_L, "STACK INIT ASSERT failed (%d not %d): %s:%d", lua_gettop(m_L), offset_, file_, line_); // doesn't return |
81 | } | 81 | } |
82 | } | 82 | } |
83 | 83 | ||
@@ -88,7 +88,7 @@ class StackChecker | |||
88 | if (lua_gettop(m_L) != pos_) | 88 | if (lua_gettop(m_L) != pos_) |
89 | { | 89 | { |
90 | assert(false); | 90 | assert(false); |
91 | std::ignore = luaL_error(m_L, "STACK INIT ASSERT failed (%d not %d): %s:%d", lua_gettop(m_L), pos_, file_, line_); | 91 | luaL_error(m_L, "STACK INIT ASSERT failed (%d not %d): %s:%d", lua_gettop(m_L), pos_, file_, line_); // doesn't return |
92 | } | 92 | } |
93 | } | 93 | } |
94 | 94 | ||
@@ -108,7 +108,7 @@ class StackChecker | |||
108 | if (actual != expected_) | 108 | if (actual != expected_) |
109 | { | 109 | { |
110 | assert(false); | 110 | assert(false); |
111 | std::ignore = luaL_error(m_L, "STACK ASSERT failed (%d not %d): %s:%d", actual, expected_, file_, line_); | 111 | luaL_error(m_L, "STACK ASSERT failed (%d not %d): %s:%d", actual, expected_, file_, line_); // doesn't return |
112 | } | 112 | } |
113 | } | 113 | } |
114 | } | 114 | } |
@@ -128,7 +128,7 @@ inline void STACK_GROW(lua_State* L, int n_) | |||
128 | { | 128 | { |
129 | if (!lua_checkstack(L, n_)) | 129 | if (!lua_checkstack(L, n_)) |
130 | { | 130 | { |
131 | std::ignore = luaL_error(L, "Cannot grow stack!"); | 131 | luaL_error(L, "Cannot grow stack!"); // doesn't return |
132 | } | 132 | } |
133 | } | 133 | } |
134 | 134 | ||