VC6 doesn't seem to want to accept default parameter value for templated functions like this. Poor solution: just put in the default in the actual function call.
This commit is contained in:
@@ -71,7 +71,7 @@ int LuaFunc_##func( lua_State *L ) { \
|
||||
REQ_ARGS( #func, 1 ); \
|
||||
REQ_ARG( #func, 1, string ); \
|
||||
CString str; \
|
||||
LuaHelpers::PopStack( str ); \
|
||||
LuaHelpers::PopStack( str, NULL ); \
|
||||
LUA_RETURN( call, L ); \
|
||||
} \
|
||||
LuaFunction( func ); /* register it */
|
||||
@@ -83,8 +83,8 @@ int LuaFunc_##func( lua_State *L ) { \
|
||||
REQ_ARG( #func, 2, string ); \
|
||||
CString str1; \
|
||||
CString str2; \
|
||||
LuaHelpers::PopStack( str2 ); \
|
||||
LuaHelpers::PopStack( str1 ); \
|
||||
LuaHelpers::PopStack( str2, NULL ); \
|
||||
LuaHelpers::PopStack( str1, NULL ); \
|
||||
LUA_RETURN( call, L ); \
|
||||
} \
|
||||
LuaFunction( func ); /* register it */
|
||||
|
||||
@@ -141,7 +141,7 @@ void LuaManager::SetGlobal( const CString &sName )
|
||||
static int LuaPanic( lua_State *L )
|
||||
{
|
||||
CString sErr;
|
||||
LuaHelpers::PopStack( sErr );
|
||||
LuaHelpers::PopStack( sErr, NULL );
|
||||
|
||||
RageException::Throw( "%s", sErr.c_str() );
|
||||
}
|
||||
@@ -270,7 +270,7 @@ bool LuaManager::RunScript( const CString &sScript, const CString &sName, CStrin
|
||||
|
||||
if( ret )
|
||||
{
|
||||
LuaHelpers::PopStack( sError );
|
||||
LuaHelpers::PopStack( sError, NULL );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -280,7 +280,7 @@ bool LuaManager::RunScript( const CString &sScript, const CString &sName, CStrin
|
||||
int ret = lua_pcall( L, 0, iReturnValues, 0 );
|
||||
if( ret )
|
||||
{
|
||||
LuaHelpers::PopStack( sError );
|
||||
LuaHelpers::PopStack( sError, NULL );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -861,7 +861,7 @@ int LuaFunc_GetPreference( lua_State *L )
|
||||
REQ_ARG( "GetPreference", 1, string );
|
||||
|
||||
CString sName;
|
||||
LuaHelpers::PopStack( sName );
|
||||
LuaHelpers::PopStack( sName, NULL );
|
||||
|
||||
IPreference *pPref = PREFSMAN->GetPreferenceByName( sName );
|
||||
if( pPref == NULL )
|
||||
|
||||
Reference in New Issue
Block a user