- fixed compilation on POSIX targets

src/p_acs.cpp:3250:75: error: cannot pass object of non-trivial type 'FString' through variadic constructor; call will abort at runtime [-Wnon-pod-varargs]
src/p_conversation.cpp:354:56: error: cannot pass object of non-trivial type 'FString' through variadic constructor; call will abort at runtime [-Wnon-pod-varargs]
src/p_conversation.cpp:438:51: error: cannot pass object of non-trivial type 'FString' through variadic constructor; call will abort at runtime [-Wnon-pod-varargs]
src/p_conversation.cpp:548:58: error: cannot pass object of non-trivial type 'FString' through variadic constructor; call will abort at runtime [-Wnon-pod-varargs]
src/p_conversation.cpp:572:59: error: cannot pass object of non-trivial type 'FString' through variadic constructor; call will abort at runtime [-Wnon-pod-varargs]
src/p_conversation.cpp:584:58: error: cannot pass object of non-trivial type 'FString' through variadic constructor; call will abort at runtime [-Wnon-pod-varargs]
This commit is contained in:
alexey.lysiuk 2019-02-06 12:22:05 +02:00
parent 7fa3081581
commit 37a79470de
2 changed files with 6 additions and 6 deletions

View file

@ -3247,7 +3247,7 @@ const char *FBehavior::LookupString (uint32_t index, bool forprint) const
token.Substitute(" ", "");
token.Truncate(5);
FStringf label("TXT_ACS_%s_%d_%.5s", Level->MapName.GetChars(), index, token);
FStringf label("TXT_ACS_%s_%d_%.5s", Level->MapName.GetChars(), index, token.GetChars());
auto p = GStrings[label];
if (p) return p;
}

View file

@ -351,7 +351,7 @@ static FStrifeDialogueNode *ReadRetailNode (FLevelLocals *Level, const char *nam
if (name)
{
FStringf label("$TXT_DLG_%s_d%d_%s", name, int(pos), TokenFromString(speech.Dialogue));
FStringf label("$TXT_DLG_%s_d%d_%s", name, int(pos), TokenFromString(speech.Dialogue).GetChars());
node->Dialogue = label;
}
else
@ -435,7 +435,7 @@ static FStrifeDialogueNode *ReadTeaserNode (FLevelLocals *Level, const char *nam
// Convert the rest of the data to our own internal format.
if (name)
{
FStringf label("$TXT_DLG_%s_d%d_%s", name, pos, TokenFromString(speech.Dialogue));
FStringf label("$TXT_DLG_%s_d%d_%s", name, pos, TokenFromString(speech.Dialogue).GetChars());
node->Dialogue = label;
}
else
@ -545,7 +545,7 @@ static void ParseReplies (const char *name, int pos, FStrifeDialogueReply **repl
if (name)
{
FStringf label("$TXT_RPLY%d_%s_d%d_%s", j, name, pos, TokenFromString(rsp->Reply));
FStringf label("$TXT_RPLY%d_%s_d%d_%s", j, name, pos, TokenFromString(rsp->Reply).GetChars());
reply->Reply = label;
}
else
@ -569,7 +569,7 @@ static void ParseReplies (const char *name, int pos, FStrifeDialogueReply **repl
{
if (name)
{
FStringf label("$TXT_RYES%d_%s_d%d_%s", j, name, pos, TokenFromString(rsp->Yes));
FStringf label("$TXT_RYES%d_%s_d%d_%s", j, name, pos, TokenFromString(rsp->Yes).GetChars());
reply->QuickYes = label;
}
else
@ -581,7 +581,7 @@ static void ParseReplies (const char *name, int pos, FStrifeDialogueReply **repl
{
if (name && strncmp(rsp->No, "NO. ", 4)) // All 'no' nodes starting with 'NO.' won't ever be shown and they all contain broken text.
{
FStringf label("$TXT_RNO%d_%s_d%d_%s", j, name, pos, TokenFromString(rsp->No));
FStringf label("$TXT_RNO%d_%s_d%d_%s", j, name, pos, TokenFromString(rsp->No).GetChars());
reply->QuickNo = label;
}
else