the remaining GetChars additions.

The offending operator const char * no longer exists.
This commit is contained in:
Christoph Oelckers 2023-10-07 23:44:01 +02:00
commit 6055ff029d
11 changed files with 53 additions and 55 deletions

View file

@ -458,7 +458,7 @@ static void ParseActorFlag (FScanner &sc, Baggage &bag, int mod)
sc.MustGetString ();
part2 = sc.String;
}
HandleActorFlag(sc, bag, part1, part2, mod);
HandleActorFlag(sc, bag, part1.GetChars(), part2, mod);
}
//==========================================================================
@ -722,12 +722,12 @@ static bool ParsePropertyParams(FScanner &sc, FPropertyInfo *prop, AActor *defau
case 'S':
sc.MustGetString();
conv.s = strings[strings.Reserve(1)] = sc.String;
conv.s = (strings[strings.Reserve(1)] = sc.String).GetChars();
break;
case 'T':
sc.MustGetString();
conv.s = strings[strings.Reserve(1)] = strbin1(sc.String);
conv.s = (strings[strings.Reserve(1)] = strbin1(sc.String)).GetChars();
break;
case 'C':
@ -747,7 +747,7 @@ static bool ParsePropertyParams(FScanner &sc, FPropertyInfo *prop, AActor *defau
else
{
sc.MustGetString ();
conv.s = strings[strings.Reserve(1)] = sc.String;
conv.s = (strings[strings.Reserve(1)] = sc.String).GetChars();
pref.i = 1;
}
break;
@ -775,7 +775,7 @@ static bool ParsePropertyParams(FScanner &sc, FPropertyInfo *prop, AActor *defau
do
{
sc.MustGetString ();
conv.s = strings[strings.Reserve(1)] = sc.String;
conv.s = (strings[strings.Reserve(1)] = sc.String).GetChars();
params.Push(conv);
params[0].i++;
}
@ -961,7 +961,7 @@ static void ParseActorProperty(FScanner &sc, Baggage &bag)
sc.UnGet ();
}
FPropertyInfo *prop = FindProperty(propname);
FPropertyInfo *prop = FindProperty(propname.GetChars());
if (prop != NULL)
{
@ -976,9 +976,9 @@ static void ParseActorProperty(FScanner &sc, Baggage &bag)
FScriptPosition::ErrorCounter++;
}
}
else if (MatchString(propname, statenames) != -1)
else if (MatchString(propname.GetChars(), statenames) != -1)
{
bag.statedef.SetStateLabel(propname, CheckState (sc, bag.Info));
bag.statedef.SetStateLabel(propname.GetChars(), CheckState (sc, bag.Info));
}
else
{

View file

@ -170,7 +170,7 @@ do_goto:
statestring += '+';
statestring += sc.String;
}
if (!bag.statedef.SetGotoLabel(statestring))
if (!bag.statedef.SetGotoLabel(statestring.GetChars()))
{
sc.ScriptError("GOTO before first state");
}
@ -207,7 +207,7 @@ do_stop:
{
do
{
bag.statedef.AddStateLabel(statestring);
bag.statedef.AddStateLabel(statestring.GetChars());
statestring = ParseStateString(sc);
if (!statestring.CompareNoCase("GOTO"))
{
@ -230,7 +230,7 @@ do_stop:
}
scp = sc;
state.sprite = GetSpriteIndex(statestring);
state.sprite = GetSpriteIndex(statestring.GetChars());
state.Misc1 = state.Misc2 = 0;
sc.MustGetString();
statestring = sc.String;
@ -334,7 +334,7 @@ endofstate:
auto funcsym = CreateAnonymousFunction(actor->VMType, nullptr, state.UseFlags);
state.ActionFunc = FunctionBuildList.AddFunction(bag.Namespace, bag.Version, funcsym, ScriptCode, FStringf("%s.StateFunction.%d", actor->TypeName.GetChars(), bag.statedef.GetStateCount()), true, bag.statedef.GetStateCount(), int(statestring.Len()), sc.LumpNum);
}
int count = bag.statedef.AddStates(&state, statestring, scp);
int count = bag.statedef.AddStates(&state, statestring.GetChars(), scp);
if (count < 0)
{
sc.ScriptError("Invalid frame character string '%s'", statestring.GetChars());

View file

@ -152,18 +152,18 @@ bool ModActorFlag(AActor *actor, const FString &flagname, bool set, bool printer
if (actor != NULL)
{
auto Level = actor->Level;
const char *dot = strchr(flagname, '.');
const char *dot = strchr(flagname.GetChars(), '.');
FFlagDef *fd;
PClassActor *cls = actor->GetClass();
if (dot != NULL)
{
FString part1(flagname.GetChars(), dot - flagname);
fd = FindFlag(cls, part1, dot + 1);
FString part1(flagname.GetChars(), dot - flagname.GetChars());
fd = FindFlag(cls, part1.GetChars(), dot + 1);
}
else
{
fd = FindFlag(cls, flagname, NULL);
fd = FindFlag(cls, flagname.GetChars(), NULL);
}
if (fd != NULL)
@ -245,7 +245,7 @@ INTBOOL CheckActorFlag(AActor *owner, const char *flagname, bool printerror)
if (dot != NULL)
{
FString part1(flagname, dot-flagname);
fd = FindFlag (cls, part1, dot+1);
fd = FindFlag (cls, part1.GetChars(), dot+1);
}
else
{
@ -1377,7 +1377,7 @@ DEFINE_CLASS_PROPERTY_PREFIX(powerup, type, S, PowerupGiver)
{
FString st;
st.Format("%s%s", strnicmp(str, "power", 5) ? "Power" : "", str);
cls = FindClassTentative(st, pow);
cls = FindClassTentative(st.GetChars(), pow);
}
else
{