Sfoglia il codice sorgente

vcmi: build lua with STRICT_COMPILATION

This is a fixes for some LUA warnings for building it with strict
compilation.
Konstantin 2 anni fa
parent
commit
fb38050f9b

+ 1 - 1
scripting/lua/LuaScriptModule.cpp

@@ -17,7 +17,7 @@
 #define strcpy_s(a, b, c) strncpy(a, c, b)
 #define strcpy_s(a, b, c) strncpy(a, c, b)
 #endif
 #endif
 
 
-const char *g_cszAiName = "Lua interpreter";
+static const char *g_cszAiName = "Lua interpreter";
 
 
 VCMI_LIB_NAMESPACE_BEGIN
 VCMI_LIB_NAMESPACE_BEGIN
 
 

+ 1 - 1
scripting/lua/LuaScriptingContext.cpp

@@ -329,7 +329,7 @@ JsonNode LuaContext::saveState()
 {
 {
 	JsonNode data;
 	JsonNode data;
 	getGlobal(STATE_FIELD, data);
 	getGlobal(STATE_FIELD, data);
-	return std::move(data);
+	return data;
 }
 }
 
 
 void LuaContext::pop(JsonNode & value)
 void LuaContext::pop(JsonNode & value)