Skip to content

Commit bded1bf

Browse files
committed
Fix clang error
src/unit/script_unittype.cpp:1345:54: error: cannot pass non-trivial object of type 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char> >') to variadic function; expected type from format string was 'char *' [-Wnon-pod-varargs]
1 parent c4a0cb0 commit bded1bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/unit/script_unittype.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1342,7 +1342,7 @@ static int CclDefineUnitType(lua_State *l)
13421342
type->Parent = LuaToString(l, -1);
13431343
CUnitType *parent_type = UnitTypeByIdent(type->Parent);
13441344
if (!parent_type) {
1345-
LuaError(l, "Unit type %s not defined" _C_ type->Parent);
1345+
LuaError(l, "Unit type %s not defined" _C_ type->Parent.c_str());
13461346
}
13471347
type->Class = parent_type->Class;
13481348
type->DrawLevel = parent_type->DrawLevel;

0 commit comments

Comments
 (0)