From 1b401b9c0a3bb5c831f01bf15e1b45e08098b94d Mon Sep 17 00:00:00 2001 From: reuk Date: Fri, 8 Dec 2023 18:35:34 +0000 Subject: [PATCH] StringArray: Add nodiscard --- modules/juce_core/text/juce_StringArray.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/juce_core/text/juce_StringArray.h b/modules/juce_core/text/juce_StringArray.h index c531454649..c7db257553 100644 --- a/modules/juce_core/text/juce_StringArray.h +++ b/modules/juce_core/text/juce_StringArray.h @@ -315,8 +315,8 @@ public: token delimiters, and return the parsed tokens as an array. @see addTokens */ - static StringArray fromTokens (StringRef stringToTokenise, - bool preserveQuotedStrings); + [[nodiscard]] static StringArray fromTokens (StringRef stringToTokenise, + bool preserveQuotedStrings); /** Returns an array containing the tokens in a given string. @@ -331,9 +331,9 @@ public: between quotes is not broken up into tokens. @see addTokens */ - static StringArray fromTokens (StringRef stringToTokenise, - StringRef breakCharacters, - StringRef quoteCharacters); + [[nodiscard]] static StringArray fromTokens (StringRef stringToTokenise, + StringRef breakCharacters, + StringRef quoteCharacters); /** Returns an array containing the lines in a given string. @@ -341,7 +341,7 @@ public: array containing these lines. Line-break characters are omitted from the strings that are added to the array. */ - static StringArray fromLines (StringRef stringToBreakUp); + [[nodiscard]] static StringArray fromLines (StringRef stringToBreakUp); //============================================================================== /** Removes all elements from the array. */