From 37a79470de53c3fc33340936bf62db45622a4e99 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Wed, 6 Feb 2019 12:22:05 +0200 Subject: [PATCH] - 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] --- src/p_acs.cpp | 2 +- src/p_conversation.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 40e38c690..f33c35ed9 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -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; } diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 6ae26d308..cd6b7b803 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -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