summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-10-05 14:09:42 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-12-18 22:03:40 +0100
commit090d8305e4e3c3ee085a897b72f2b4708e183eb8 (patch)
treee703cc7fcb7f16c85f16b094d5df0bd0a8d698e8 /src/Bindings/LuaState.h
parentHorsies: don't always broadcast metadata (diff)
downloadcuberite-090d8305e4e3c3ee085a897b72f2b4708e183eb8.tar
cuberite-090d8305e4e3c3ee085a897b72f2b4708e183eb8.tar.gz
cuberite-090d8305e4e3c3ee085a897b72f2b4708e183eb8.tar.bz2
cuberite-090d8305e4e3c3ee085a897b72f2b4708e183eb8.tar.lz
cuberite-090d8305e4e3c3ee085a897b72f2b4708e183eb8.tar.xz
cuberite-090d8305e4e3c3ee085a897b72f2b4708e183eb8.tar.zst
cuberite-090d8305e4e3c3ee085a897b72f2b4708e183eb8.zip
Diffstat (limited to 'src/Bindings/LuaState.h')
-rw-r--r--src/Bindings/LuaState.h5
1 files changed, 2 insertions, 3 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;