Permalink
Browse files

Fix LuaHelper::GetInteger()'s use of 'int' over 'lua_Integer'

  • Loading branch information...
jjensen committed Jul 1, 2018
1 parent 7eb904c commit 7a3929af4a44f0747e74cc0655873d303be504ed
Showing with 5 additions and 5 deletions.
  1. +4 −4 Src/LuaPlus/LuaHelper_Object.h
  2. +1 −1 Src/LuaPlus/LuaHelper_StackObject.h
@@ -58,8 +58,8 @@ namespace LuaHelper
of the right type.
\return Returns the value found or the defaultValue.
**/
inline lua_Integer GetInteger( const LuaObject& obj, int key, bool require = true, int defaultValue = -1 );
inline lua_Integer GetInteger( const LuaObject& obj, const char* key, bool require = true, int defaultValue = -1 );
inline lua_Integer GetInteger( const LuaObject& obj, int key, bool require = true, lua_Integer defaultValue = -1 );
inline lua_Integer GetInteger( const LuaObject& obj, const char* key, bool require = true, lua_Integer defaultValue = -1 );
/**
@@ -164,7 +164,7 @@ inline bool GetBoolean( const LuaObject& obj, const char* key, bool require, boo
}
inline lua_Integer GetInteger( const LuaObject& obj, int key, bool require, int defaultValue ) {
inline lua_Integer GetInteger( const LuaObject& obj, int key, bool require, lua_Integer defaultValue ) {
LuaObject intObj = obj[ key ];
if ( !intObj.IsInteger() ) {
if ( require ) {
@@ -176,7 +176,7 @@ inline lua_Integer GetInteger( const LuaObject& obj, int key, bool require, int
}
inline lua_Integer GetInteger( const LuaObject& obj, const char* key, bool require, int defaultValue ) {
inline lua_Integer GetInteger( const LuaObject& obj, const char* key, bool require, lua_Integer defaultValue ) {
LuaObject intObj = obj[ key ];
if ( !intObj.IsInteger() ) {
if ( require ) {
@@ -68,7 +68,7 @@ namespace LuaHelper
\return Returns the value found or the defaultValue.
**/
template< typename KeyT >
static int GetInteger( const LuaStackObject& obj, KeyT key, bool require = true, int defaultValue = -1 ) {
static lua_Integer GetInteger( const LuaStackObject& obj, KeyT key, bool require = true, lua_Integer defaultValue = -1 ) {
LuaAutoObject intObj = obj[ key ];
if ( !intObj.IsInteger() ) {
if ( require ) {

0 comments on commit 7a3929a

Please sign in to comment.