summaryrefslogtreecommitdiffstats
path: root/src/Bindings
diff options
context:
space:
mode:
Diffstat (limited to 'src/Bindings')
-rw-r--r--src/Bindings/LuaState.h5
-rw-r--r--src/Bindings/ManualBindings.cpp2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h
index 2c45377c7..0bdecdfc7 100644
--- a/src/Bindings/LuaState.h
+++ b/src/Bindings/LuaState.h
@@ -665,10 +665,9 @@ public:
bool GetStackValue(int a_StackPos, cUUID & a_Value);
// template to catch all of the various c++ integral types without overload conflicts
- template <class T>
- bool GetStackValue(int a_StackPos, T & a_ReturnedVal, typename std::enable_if<std::is_integral<T>::value>::type * unused = nullptr)
+ template <class T, typename = std::enable_if_t<std::is_integral_v<T>>>
+ bool GetStackValue(int a_StackPos, T & a_ReturnedVal)
{
- UNUSED(unused);
if (!lua_isnumber(m_LuaState, a_StackPos)) // Also accepts strings representing a number: https://pgl.yoyo.org/luai/i/lua_isnumber
{
return false;
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp
index e62dab289..92f7dd92b 100644
--- a/src/Bindings/ManualBindings.cpp
+++ b/src/Bindings/ManualBindings.cpp
@@ -2760,7 +2760,7 @@ static int tolua_cItem_EnchantByXPLevels(lua_State * tolua_S)
// Get the params:
cItem * Self;
- int NumXPLevels;
+ unsigned NumXPLevels;
L.GetStackValue(1, Self);
L.GetStackValue(2, NumXPLevels);