summaryrefslogtreecommitdiffstats
path: root/src/Bindings
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Bindings/DeprecatedBindings.cpp38
-rw-r--r--src/Bindings/LuaState.cpp3
-rw-r--r--src/Bindings/ManualBindings.cpp26
3 files changed, 33 insertions, 34 deletions
diff --git a/src/Bindings/DeprecatedBindings.cpp b/src/Bindings/DeprecatedBindings.cpp
index d2e60945d..07b1a29fd 100644
--- a/src/Bindings/DeprecatedBindings.cpp
+++ b/src/Bindings/DeprecatedBindings.cpp
@@ -25,9 +25,9 @@ static int tolua_get_AllToLua_g_BlockLightValue(lua_State* tolua_S)
#ifndef TOLUA_RELEASE
{
tolua_Error tolua_err;
- if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
+ if (!tolua_isnumber(tolua_S, 2, 0, &tolua_err))
{
- tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err);
+ tolua_error(tolua_S, "#vinvalid type in array indexing.", &tolua_err);
}
}
#endif
@@ -36,7 +36,7 @@ static int tolua_get_AllToLua_g_BlockLightValue(lua_State* tolua_S)
{
tolua_error(tolua_S, "array indexing out of range.", NULL);
}
- tolua_pushnumber(tolua_S,(lua_Number)cBlockInfo::GetLightValue((BLOCKTYPE)BlockType));
+ tolua_pushnumber(tolua_S, (lua_Number)cBlockInfo::GetLightValue((BLOCKTYPE)BlockType));
return 1;
}
#endif // #ifndef TOLUA_DISABLE
@@ -53,8 +53,8 @@ static int tolua_get_AllToLua_g_BlockSpreadLightFalloff(lua_State* tolua_S)
#ifndef TOLUA_RELEASE
{
tolua_Error tolua_err;
- if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
- tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err);
+ if (!tolua_isnumber(tolua_S, 2, 0, &tolua_err))
+ tolua_error(tolua_S, "#vinvalid type in array indexing.", &tolua_err);
}
#endif
BlockType = (int)tolua_tonumber(tolua_S, 2, 0);
@@ -79,8 +79,8 @@ static int tolua_get_AllToLua_g_BlockTransparent(lua_State* tolua_S)
#ifndef TOLUA_RELEASE
{
tolua_Error tolua_err;
- if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
- tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err);
+ if (!tolua_isnumber(tolua_S, 2, 0, &tolua_err))
+ tolua_error(tolua_S, "#vinvalid type in array indexing.", &tolua_err);
}
#endif
BlockType = (int)tolua_tonumber(tolua_S, 2, 0);
@@ -105,8 +105,8 @@ static int tolua_get_AllToLua_g_BlockOneHitDig(lua_State* tolua_S)
#ifndef TOLUA_RELEASE
{
tolua_Error tolua_err;
- if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
- tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err);
+ if (!tolua_isnumber(tolua_S, 2, 0, &tolua_err))
+ tolua_error(tolua_S, "#vinvalid type in array indexing.", &tolua_err);
}
#endif
BlockType = (int)tolua_tonumber(tolua_S, 2, 0);
@@ -131,8 +131,8 @@ static int tolua_get_AllToLua_g_BlockPistonBreakable(lua_State* tolua_S)
#ifndef TOLUA_RELEASE
{
tolua_Error tolua_err;
- if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
- tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err);
+ if (!tolua_isnumber(tolua_S, 2, 0, &tolua_err))
+ tolua_error(tolua_S, "#vinvalid type in array indexing.", &tolua_err);
}
#endif
BlockType = (int)tolua_tonumber(tolua_S, 2, 0);
@@ -157,8 +157,8 @@ static int tolua_get_AllToLua_g_BlockIsSnowable(lua_State* tolua_S)
#ifndef TOLUA_RELEASE
{
tolua_Error tolua_err;
- if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
- tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err);
+ if (!tolua_isnumber(tolua_S, 2, 0, &tolua_err))
+ tolua_error(tolua_S, "#vinvalid type in array indexing.", &tolua_err);
}
#endif
BlockType = (int)tolua_tonumber(tolua_S, 2, 0);
@@ -183,8 +183,8 @@ static int tolua_get_AllToLua_g_BlockRequiresSpecialTool(lua_State* tolua_S)
#ifndef TOLUA_RELEASE
{
tolua_Error tolua_err;
- if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
- tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err);
+ if (!tolua_isnumber(tolua_S, 2, 0, &tolua_err))
+ tolua_error(tolua_S, "#vinvalid type in array indexing.", &tolua_err);
}
#endif
BlockType = (int)tolua_tonumber(tolua_S, 2, 0);
@@ -209,8 +209,8 @@ static int tolua_get_AllToLua_g_BlockIsSolid(lua_State* tolua_S)
#ifndef TOLUA_RELEASE
{
tolua_Error tolua_err;
- if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
- tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err);
+ if (!tolua_isnumber(tolua_S, 2, 0, &tolua_err))
+ tolua_error(tolua_S, "#vinvalid type in array indexing.", &tolua_err);
}
#endif
BlockType = (int)tolua_tonumber(tolua_S, 2, 0);
@@ -235,8 +235,8 @@ static int tolua_get_AllToLua_g_BlockFullyOccupiesVoxel(lua_State* tolua_S)
#ifndef TOLUA_RELEASE
{
tolua_Error tolua_err;
- if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
- tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err);
+ if (!tolua_isnumber(tolua_S, 2, 0, &tolua_err))
+ tolua_error(tolua_S, "#vinvalid type in array indexing.", &tolua_err);
}
#endif
BlockType = (int)tolua_tonumber(tolua_S, 2, 0);
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp
index 7d918cf2b..e123a87c9 100644
--- a/src/Bindings/LuaState.cpp
+++ b/src/Bindings/LuaState.cpp
@@ -1336,9 +1336,8 @@ void cLuaState::LogStack(lua_State * a_LuaState, const char * a_Header)
{
UNUSED(a_Header); // The param seems unused when compiling for release, so the compiler warns
-
// Format string consisting only of %s is used to appease the compiler
- LOGD("%s",(a_Header != NULL) ? a_Header : "Lua C API Stack contents:");
+ LOGD("%s", (a_Header != NULL) ? a_Header : "Lua C API Stack contents:");
for (int i = lua_gettop(a_LuaState); i > 0; i--)
{
AString Value;
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp
index 530101d47..4047adc3a 100644
--- a/src/Bindings/ManualBindings.cpp
+++ b/src/Bindings/ManualBindings.cpp
@@ -958,7 +958,7 @@ tolua_lerror:
static int tolua_cWorld_TryGetHeight(lua_State * tolua_S)
{
// Exported manually, because tolua would require the out-only param a_Height to be used when calling
- // Takes (a_World,) a_BlockX, a_BlockZ
+ // Takes a_World, a_BlockX, a_BlockZ
// Returns Height, IsValid
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
@@ -1926,12 +1926,12 @@ static int tolua_cPluginLua_AddWebTab(lua_State * tolua_S)
int Reference = LUA_REFNIL;
if (
- tolua_isstring(tolua_S, 2, 0, &tolua_err ) &&
- lua_isfunction(tolua_S, 3 )
+ tolua_isstring(tolua_S, 2, 0, &tolua_err) &&
+ lua_isfunction(tolua_S, 3)
)
{
Reference = luaL_ref(tolua_S, LUA_REGISTRYINDEX);
- Title = ((std::string) tolua_tocppstring(tolua_S,2,0));
+ Title = ((std::string)tolua_tocppstring(tolua_S, 2, 0));
}
else
{
@@ -2591,7 +2591,7 @@ static int tolua_cBlockArea_LoadFromSchematicFile(lua_State * tolua_S)
}
AString Filename = tolua_tostring(tolua_S, 2, 0);
- bool res = cSchematicFileSerializer::LoadFromSchematicFile(*self,Filename);
+ bool res = cSchematicFileSerializer::LoadFromSchematicFile(*self, Filename);
tolua_pushboolean(tolua_S, res);
return 1;
}
@@ -2651,7 +2651,7 @@ static int tolua_cBlockArea_SaveToSchematicFile(lua_State * tolua_S)
return 0;
}
AString Filename = tolua_tostring(tolua_S, 2, 0);
- bool res = cSchematicFileSerializer::SaveToSchematicFile(*self,Filename);
+ bool res = cSchematicFileSerializer::SaveToSchematicFile(*self, Filename);
tolua_pushboolean(tolua_S, res);
return 1;
}
@@ -3065,13 +3065,13 @@ void ManualBindings::Bind(lua_State * tolua_S)
tolua_function(tolua_S, "AddWebTab", tolua_cPluginLua_AddWebTab);
tolua_endmodule(tolua_S);
- tolua_cclass(tolua_S,"HTTPRequest","HTTPRequest","",NULL);
- tolua_beginmodule(tolua_S,"HTTPRequest");
- // tolua_variable(tolua_S,"Method",tolua_get_HTTPRequest_Method,tolua_set_HTTPRequest_Method);
- // tolua_variable(tolua_S,"Path",tolua_get_HTTPRequest_Path,tolua_set_HTTPRequest_Path);
- tolua_variable(tolua_S,"FormData",tolua_get_HTTPRequest_FormData,0);
- tolua_variable(tolua_S,"Params",tolua_get_HTTPRequest_Params,0);
- tolua_variable(tolua_S,"PostParams",tolua_get_HTTPRequest_PostParams,0);
+ tolua_cclass(tolua_S, "HTTPRequest", "HTTPRequest", "", NULL);
+ tolua_beginmodule(tolua_S, "HTTPRequest");
+ // tolua_variable(tolua_S, "Method", tolua_get_HTTPRequest_Method, tolua_set_HTTPRequest_Method);
+ // tolua_variable(tolua_S, "Path", tolua_get_HTTPRequest_Path, tolua_set_HTTPRequest_Path);
+ tolua_variable(tolua_S, "FormData", tolua_get_HTTPRequest_FormData, 0);
+ tolua_variable(tolua_S, "Params", tolua_get_HTTPRequest_Params, 0);
+ tolua_variable(tolua_S, "PostParams", tolua_get_HTTPRequest_PostParams, 0);
tolua_endmodule(tolua_S);
tolua_beginmodule(tolua_S, "cWebAdmin");