浏览代码

vcmi: build lua with STRICT_COMPILATION

This is a fixes for some LUA warnings for building it with strict
compilation.
Konstantin 2 年之前
父节点
当前提交
fb38050f9b
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      scripting/lua/LuaScriptModule.cpp
  2. 1 1
      scripting/lua/LuaScriptingContext.cpp

+ 1 - 1
scripting/lua/LuaScriptModule.cpp

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

+ 1 - 1
scripting/lua/LuaScriptingContext.cpp

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