Fixed build with Clang

Fixed bunch of compilation errors:
cannot pass non-trivial object of type 'FString' to variadic method; expected type from format string was 'char *' [-Wnon-pod-varargs]

Fixed linker erorr:
g_doomedmap.cpp.o: In function `InitActorNumsFromMapinfo()':
src/g_doomedmap.cpp: undefined reference to `PClass::FindActor(FName)'
This commit is contained in:
alexey.lysiuk 2017-04-13 10:17:11 +03:00
commit 1889efa814
7 changed files with 13 additions and 12 deletions

View file

@ -132,7 +132,7 @@ bool AStateProvider::CallStateChain (AActor *actor, FState *state)
{
if (!(state->UseFlags & SUF_ITEM))
{
Printf(TEXTCOLOR_RED "State %s not flagged for use in CustomInventory state chains.\n", FState::StaticGetStateName(state));
Printf(TEXTCOLOR_RED "State %s not flagged for use in CustomInventory state chains.\n", FState::StaticGetStateName(state).GetChars());
return false;
}
@ -146,7 +146,7 @@ bool AStateProvider::CallStateChain (AActor *actor, FState *state)
// If an unsafe function (i.e. one that accesses user variables) is being detected, print a warning once and remove the bogus function. We may not call it because that would inevitably crash.
auto owner = FState::StaticFindStateOwner(state);
Printf(TEXTCOLOR_RED "Unsafe state call in state %s to %s which accesses user variables. The action function has been removed from this state\n",
FState::StaticGetStateName(state), state->ActionFunc->PrintableName.GetChars());
FState::StaticGetStateName(state).GetChars(), state->ActionFunc->PrintableName.GetChars());
state->ActionFunc = nullptr;
}
@ -189,7 +189,7 @@ bool AStateProvider::CallStateChain (AActor *actor, FState *state)
catch (CVMAbortException &err)
{
err.MaybePrintMessage();
err.stacktrace.AppendFormat("Called from state %s in inventory state chain in %s\n", FState::StaticGetStateName(state), GetClass()->TypeName.GetChars());
err.stacktrace.AppendFormat("Called from state %s in inventory state chain in %s\n", FState::StaticGetStateName(state).GetChars(), GetClass()->TypeName.GetChars());
throw;
}