Skip to content

Commit 0782a94

Browse files
authored
Windows compilation fixes (#254)
1 parent 534a639 commit 0782a94

4 files changed

Lines changed: 4 additions & 8 deletions

File tree

‎Distribution/LuaBridge/LuaBridge.h‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,8 +1067,6 @@ inline void lua_pushcclosure_x(lua_State* L, lua_CFunction fn, const char* debug
10671067
[[noreturn]] inline void lua_error_x(lua_State* L)
10681068
{
10691069
lua_error(L);
1070-
1071-
detail::unreachable();
10721070
}
10731071

10741072
inline int lua_getstack_x(lua_State* L, int level, lua_Debug* ar)
@@ -2699,7 +2697,7 @@ class BadExpectedAccess : public std::runtime_error
26992697

27002698
namespace detail {
27012699
template <class E>
2702-
inline void throw_bad_expected_access_or_abort(E e)
2700+
inline void throw_bad_expected_access_or_abort([[maybe_unused]] E e)
27032701
{
27042702
#if LUABRIDGE_HAS_EXCEPTIONS
27052703
throw BadExpectedAccess<E>(std::move(e));
@@ -10289,7 +10287,7 @@ int do_yield(lua_State* L, int nresults, int frame_abs_idx)
1028910287
}
1029010288
#endif
1029110289

10292-
[[noreturn]] inline void raise_from_exception(lua_State* L, int frame_abs_idx, std::exception_ptr ex)
10290+
[[noreturn]] inline void raise_from_exception(lua_State* L, int frame_abs_idx, [[maybe_unused]] std::exception_ptr ex)
1029310291
{
1029410292
lua_settop(L, frame_abs_idx - 1);
1029510293

‎Source/LuaBridge/detail/Coroutine.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ int do_yield(lua_State* L, int nresults, int frame_abs_idx)
351351
* @brief Raises a Lua error from a stored C++ exception (or a generic message).
352352
* Removes the frame userdata from the stack before raising so GC can collect it.
353353
*/
354-
[[noreturn]] inline void raise_from_exception(lua_State* L, int frame_abs_idx, std::exception_ptr ex)
354+
[[noreturn]] inline void raise_from_exception(lua_State* L, int frame_abs_idx, [[maybe_unused]] std::exception_ptr ex)
355355
{
356356
lua_settop(L, frame_abs_idx - 1); // pop frame (and any value above it) — GC will collect it
357357

‎Source/LuaBridge/detail/Expected.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ class BadExpectedAccess : public std::runtime_error
10471047

10481048
namespace detail {
10491049
template <class E>
1050-
inline void throw_bad_expected_access_or_abort(E e)
1050+
inline void throw_bad_expected_access_or_abort([[maybe_unused]] E e)
10511051
{
10521052
#if LUABRIDGE_HAS_EXCEPTIONS
10531053
throw BadExpectedAccess<E>(std::move(e));

‎Source/LuaBridge/detail/LuaHelpers.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,6 @@ inline void lua_pushcclosure_x(lua_State* L, lua_CFunction fn, const char* debug
184184
[[noreturn]] inline void lua_error_x(lua_State* L)
185185
{
186186
lua_error(L);
187-
188-
detail::unreachable();
189187
}
190188

191189
inline int lua_getstack_x(lua_State* L, int level, lua_Debug* ar)

0 commit comments

Comments
 (0)