summaryrefslogtreecommitdiffstats
path: root/src/Bindings
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2015-05-10 13:16:20 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2015-05-10 13:16:20 +0200
commit9c490293b88f9828577e5431c5151f7f1bec09f4 (patch)
treebe616a3c3b2db083b2f3908220818231778609ef /src/Bindings
parentFixed some warnings and logic errors in Monster.cpp (diff)
parentMerge pull request #1985 from SafwatHalaby/lessPathCalcs (diff)
downloadcuberite-9c490293b88f9828577e5431c5151f7f1bec09f4.tar
cuberite-9c490293b88f9828577e5431c5151f7f1bec09f4.tar.gz
cuberite-9c490293b88f9828577e5431c5151f7f1bec09f4.tar.bz2
cuberite-9c490293b88f9828577e5431c5151f7f1bec09f4.tar.lz
cuberite-9c490293b88f9828577e5431c5151f7f1bec09f4.tar.xz
cuberite-9c490293b88f9828577e5431c5151f7f1bec09f4.tar.zst
cuberite-9c490293b88f9828577e5431c5151f7f1bec09f4.zip
Diffstat (limited to '')
-rw-r--r--src/Bindings/LuaState.cpp4
-rw-r--r--src/Bindings/LuaWindow.cpp6
-rw-r--r--src/Bindings/ManualBindings.cpp12
-rw-r--r--src/Bindings/PluginLua.h2
4 files changed, 12 insertions, 12 deletions
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp
index fe47d45db..c96ab083a 100644
--- a/src/Bindings/LuaState.cpp
+++ b/src/Bindings/LuaState.cpp
@@ -19,13 +19,13 @@ extern "C"
#include "../Entities/Entity.h"
#include "../BlockEntities/BlockEntity.h"
-// fwd: SQLite/lsqlite3.c
+// fwd: "SQLite/lsqlite3.c"
extern "C"
{
int luaopen_lsqlite3(lua_State * L);
}
-// fwd: LuaExpat/lxplib.c:
+// fwd: "LuaExpat/lxplib.c":
extern "C"
{
int luaopen_lxp(lua_State * L);
diff --git a/src/Bindings/LuaWindow.cpp b/src/Bindings/LuaWindow.cpp
index d4014059b..5f7832ef5 100644
--- a/src/Bindings/LuaWindow.cpp
+++ b/src/Bindings/LuaWindow.cpp
@@ -159,7 +159,7 @@ void cLuaWindow::Destroy(void)
m_Plugin->Unreference(m_LuaRef);
}
- // Lua will take care of this object, it will garbage-collect it, so we *must not* delete it!
+ // Lua will take care of this object, it will garbage-collect it, so we must not delete it!
m_IsDestroyed = false;
}
@@ -167,10 +167,10 @@ void cLuaWindow::Destroy(void)
-void cLuaWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer& a_Player, cSlotArea * a_ClickedArea, bool a_ShouldApply)
+void cLuaWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a_Player, cSlotArea * a_ClickedArea, bool a_ShouldApply)
{
cSlotAreas Areas;
- for (auto Area : m_SlotAreas)
+ for (auto && Area : m_SlotAreas)
{
if (Area != a_ClickedArea)
{
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp
index e87c02181..9b3c1555d 100644
--- a/src/Bindings/ManualBindings.cpp
+++ b/src/Bindings/ManualBindings.cpp
@@ -2557,8 +2557,8 @@ static int tolua_push_StringStringMap(lua_State* tolua_S, std::map< std::string,
for (std::map<std::string, std::string>::iterator it = a_StringStringMap.begin(); it != a_StringStringMap.end(); ++it)
{
- const char* key = it->first.c_str();
- const char* value = it->second.c_str();
+ const char * key = it->first.c_str();
+ const char * value = it->second.c_str();
lua_pushstring(tolua_S, key);
lua_pushstring(tolua_S, value);
lua_settable(tolua_S, top);
@@ -2573,7 +2573,7 @@ static int tolua_push_StringStringMap(lua_State* tolua_S, std::map< std::string,
static int tolua_get_HTTPRequest_Params(lua_State* tolua_S)
{
- HTTPRequest* self = (HTTPRequest*) tolua_tousertype(tolua_S, 1, nullptr);
+ HTTPRequest * self = reinterpret_cast<HTTPRequest *>(tolua_tousertype(tolua_S, 1, nullptr));
return tolua_push_StringStringMap(tolua_S, self->Params);
}
@@ -2583,7 +2583,7 @@ static int tolua_get_HTTPRequest_Params(lua_State* tolua_S)
static int tolua_get_HTTPRequest_PostParams(lua_State* tolua_S)
{
- HTTPRequest* self = (HTTPRequest*) tolua_tousertype(tolua_S, 1, nullptr);
+ HTTPRequest * self = reinterpret_cast<HTTPRequest *>(tolua_tousertype(tolua_S, 1, nullptr));
return tolua_push_StringStringMap(tolua_S, self->PostParams);
}
@@ -2593,8 +2593,8 @@ static int tolua_get_HTTPRequest_PostParams(lua_State* tolua_S)
static int tolua_get_HTTPRequest_FormData(lua_State* tolua_S)
{
- HTTPRequest* self = (HTTPRequest*) tolua_tousertype(tolua_S, 1, nullptr);
- std::map< std::string, HTTPFormData >& FormData = self->FormData;
+ HTTPRequest * self = reinterpret_cast<HTTPRequest *>(tolua_tousertype(tolua_S, 1, nullptr));
+ std::map<std::string, HTTPFormData> & FormData = self->FormData;
lua_newtable(tolua_S);
int top = lua_gettop(tolua_S);
diff --git a/src/Bindings/PluginLua.h b/src/Bindings/PluginLua.h
index 393737b34..bedb3d83b 100644
--- a/src/Bindings/PluginLua.h
+++ b/src/Bindings/PluginLua.h
@@ -20,7 +20,7 @@
-// fwd: UI/Window.h
+// fwd: "UI/Window.h"
class cWindow;