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

@ -351,7 +351,7 @@ void DPSprite::SetState(FState *newstate, bool pending)
if (!(newstate->UseFlags & (SUF_OVERLAY|SUF_WEAPON))) // Weapon and overlay are mostly the same, the main difference is that weapon states restrict the self pointer to class Actor.
{
Printf(TEXTCOLOR_RED "State %s not flagged for use in overlays or weapons\n", FState::StaticGetStateName(newstate));
Printf(TEXTCOLOR_RED "State %s not flagged for use in overlays or weapons\n", FState::StaticGetStateName(newstate).GetChars());
State = nullptr;
Destroy();
return;
@ -360,7 +360,7 @@ void DPSprite::SetState(FState *newstate, bool pending)
{
if (Caller->IsKindOf(NAME_Weapon))
{
Printf(TEXTCOLOR_RED "State %s.%d not flagged for use in weapons\n", FState::StaticGetStateName(newstate));
Printf(TEXTCOLOR_RED "State %s.%d not flagged for use in weapons\n", FState::StaticGetStateName(newstate).GetChars());
State = nullptr;
Destroy();
return;
@ -414,7 +414,7 @@ void DPSprite::SetState(FState *newstate, bool pending)
{
// 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.
Printf(TEXTCOLOR_RED "Unsafe state call in state %sd to %s which accesses user variables. The action function has been removed from this state\n",
FState::StaticGetStateName(newstate), newstate->ActionFunc->PrintableName.GetChars());
FState::StaticGetStateName(newstate).GetChars(), newstate->ActionFunc->PrintableName.GetChars());
newstate->ActionFunc = nullptr;
}
if (newstate->CallAction(Owner->mo, Caller, &stp, &nextstate))