use default args instead of overloading
This commit is contained in:
parent
13db0d48c9
commit
38ac614359
3 changed files with 3 additions and 21 deletions
src
|
@ -68,7 +68,7 @@ enum {
|
|||
|
||||
extern lua_State *Lua;
|
||||
|
||||
extern int LuaLoadFile(const std::string &file);
|
||||
extern int LuaLoadFile(const std::string &file, const std::string &strArg = "");
|
||||
extern int LuaCall(int narg, int clear, bool exitOnError = true);
|
||||
|
||||
#define LuaError(l, args) \
|
||||
|
@ -310,8 +310,7 @@ extern bool LuaToBoolean(lua_State *l, int index, int subIndex);
|
|||
|
||||
extern void LuaGarbageCollect(); /// Perform garbage collection
|
||||
extern void InitLua(); /// Initialise Lua
|
||||
extern void LoadCcl(const std::string &filename, const std::string &luaArgStr); /// Load ccl config file
|
||||
extern void LoadCcl(const std::string &filename); /// Load ccl config file
|
||||
extern void LoadCcl(const std::string &filename, const std::string &luaArgStr = ""); /// Load ccl config file
|
||||
extern void SavePreferences(); /// Save user preferences
|
||||
extern int CclCommand(const std::string &command, bool exitOnError = true);
|
||||
|
||||
|
|
|
@ -1507,7 +1507,7 @@ void NetworkServerStartGame()
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
#ifdef DEBUG
|
||||
printf("INITIAL ServerSetupState:\n");
|
||||
for (int i = 0; i < PlayerMax - 1; ++i) {
|
||||
printf("%02d: CO: %d Race: %d Host: ", i, ServerSetupState.CompOpt[i], ServerSetupState.Race[i]);
|
||||
|
|
|
@ -232,18 +232,6 @@ int LuaLoadFile(const std::string &file, const std::string &strArg)
|
|||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
** Load a file and execute it
|
||||
**
|
||||
** @param file File to load and execute
|
||||
**
|
||||
** @return 0 for success, else exit.
|
||||
*/
|
||||
int LuaLoadFile(const std::string &file)
|
||||
{
|
||||
return LuaLoadFile(file, std::string());
|
||||
}
|
||||
|
||||
/**
|
||||
** Save preferences
|
||||
**
|
||||
|
@ -2419,11 +2407,6 @@ void LoadCcl(const std::string &filename, const std::string &luaArgStr)
|
|||
LuaGarbageCollect();
|
||||
}
|
||||
|
||||
void LoadCcl(const std::string &filename)
|
||||
{
|
||||
LoadCcl(filename, std::string());
|
||||
}
|
||||
|
||||
void ScriptRegister()
|
||||
{
|
||||
AliasRegister();
|
||||
|
|
Loading…
Add table
Reference in a new issue