mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 13:41:05 +00:00
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:
parent
1c8d698121
commit
1889efa814
7 changed files with 13 additions and 12 deletions
|
@ -34,6 +34,7 @@
|
|||
*/
|
||||
|
||||
#include "info.h"
|
||||
#include "actor.h"
|
||||
#include "p_lnspec.h"
|
||||
#include "m_fixed.h"
|
||||
#include "c_dispatch.h"
|
||||
|
|
|
@ -170,7 +170,7 @@ bool FState::CallAction(AActor *self, AActor *stateowner, FStateParamInfo *info,
|
|||
if (stateowner->IsKindOf(NAME_Weapon) && stateowner != self) callinfo = "weapon ";
|
||||
else callinfo = "overlay ";
|
||||
}
|
||||
err.stacktrace.AppendFormat("Called from %sstate %s in %s\n", callinfo, FState::StaticGetStateName(this), stateowner->GetClass()->TypeName.GetChars());
|
||||
err.stacktrace.AppendFormat("Called from %sstate %s in %s\n", callinfo, FState::StaticGetStateName(this).GetChars(), stateowner->GetClass()->TypeName.GetChars());
|
||||
throw;
|
||||
throw;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -629,7 +629,7 @@ bool AActor::SetState (FState *newstate, bool nofunction)
|
|||
}
|
||||
if (!(newstate->UseFlags & SUF_ACTOR))
|
||||
{
|
||||
Printf(TEXTCOLOR_RED "State %s in %s not flagged for use as an actor sprite\n", FState::StaticGetStateName(newstate), GetClass()->TypeName.GetChars());
|
||||
Printf(TEXTCOLOR_RED "State %s in %s not flagged for use as an actor sprite\n", FState::StaticGetStateName(newstate).GetChars(), GetClass()->TypeName.GetChars());
|
||||
state = nullptr;
|
||||
Destroy();
|
||||
return false;
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -1081,7 +1081,7 @@ void DumpStateHelper(FStateLabels *StateList, const FString &prefix)
|
|||
}
|
||||
else
|
||||
{
|
||||
Printf(PRINT_LOG, "%s%s: %s\n", prefix.GetChars(), StateList->Labels[i].Label.GetChars(), FState::StaticGetStateName(StateList->Labels[i].State));
|
||||
Printf(PRINT_LOG, "%s%s: %s\n", prefix.GetChars(), StateList->Labels[i].Label.GetChars(), FState::StaticGetStateName(StateList->Labels[i].State).GetChars());
|
||||
}
|
||||
}
|
||||
if (StateList->Labels[i].Children != NULL)
|
||||
|
|
|
@ -283,7 +283,7 @@ static void CheckForUnsafeStates(PClassActor *obj)
|
|||
{
|
||||
// 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.
|
||||
GetStateSource(state).Message(MSG_ERROR, TEXTCOLOR_RED "Unsafe state call in state %s which accesses user variables, reached by %s.%s.\n",
|
||||
FState::StaticGetStateName(state), obj->TypeName.GetChars(), FName(*test).GetChars());
|
||||
FState::StaticGetStateName(state).GetChars(), obj->TypeName.GetChars(), FName(*test).GetChars());
|
||||
}
|
||||
state = state->NextState;
|
||||
}
|
||||
|
@ -308,7 +308,7 @@ static void CheckLabel(PClassActor *obj, FStateLabel *slb, int useflag, FName st
|
|||
if (!(state->UseFlags & useflag))
|
||||
{
|
||||
GetStateSource(state).Message(MSG_ERROR, TEXTCOLOR_RED "%s references state %s as %s state, but this state is not flagged for use as %s.\n",
|
||||
obj->TypeName.GetChars(), FState::StaticGetStateName(state), statename.GetChars(), descript);
|
||||
obj->TypeName.GetChars(), FState::StaticGetStateName(state).GetChars(), statename.GetChars(), descript);
|
||||
}
|
||||
}
|
||||
if (slb->Children != nullptr)
|
||||
|
@ -359,7 +359,7 @@ static void CheckStates(PClassActor *obj)
|
|||
if (state->NextState && (state->UseFlags & state->NextState->UseFlags) != state->UseFlags)
|
||||
{
|
||||
GetStateSource(state).Message(MSG_ERROR, TEXTCOLOR_RED "State %s links to a state with incompatible restrictions.\n",
|
||||
FState::StaticGetStateName(state));
|
||||
FState::StaticGetStateName(state).GetChars());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue