summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2020-11-28 16:29:28 +1100
committer Vas Crabb <vas@vastheman.com>2020-11-28 16:29:28 +1100
commitda78088c9187dba8dc7ca730fba82dda9a1eb50f (patch)
tree2358ed910b27279e6ab57f0280143b7f859057c8 /src/frontend
parentee7ceb76b55bd9a062d2dbe69c0cdf24608811d9 (diff)
luaL_error doesn't actually return, but it lacks the noreturn attribute, so the compiler must be appeased
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/mame/luaengine.ipp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/frontend/mame/luaengine.ipp b/src/frontend/mame/luaengine.ipp
index 9d17bbba054..142a1ec269e 100644
--- a/src/frontend/mame/luaengine.ipp
+++ b/src/frontend/mame/luaengine.ipp
@@ -92,10 +92,9 @@ protected:
auto p(sol::stack::unqualified_check_get<T *>(L, 1));
if (!p)
luaL_error(L, "sol: 'self' is not of type '%s' (pass 'self' as first argument with ':' or call on proper type)", sol::detail::demangle<T>().c_str());
- else if (!*p)
+ if (!*p)
luaL_error(L, "sol: 'self' argument is nil (pass 'self' as first argument with ':' or call on a '%s' type", sol::detail::demangle<T>().c_str());
- else
- return **p;
+ return **p;
}
struct indexed_iterator