From f23953d428979ceaccbec7117d64c6bee775a0e2 Mon Sep 17 00:00:00 2001 From: Aleksandr Zharov Date: Fri, 16 Oct 2026 20:21:12 +0500 Subject: [PATCH] [Rules] Make the escape/mask helpers static hideEscaped(), hideMasked() and restoreMaskedAndEscaped() are only used in ESPEasyRules.cpp. With internal linkage GCC inlines them where they are called once (builds without FEATURE_EXTENDED_STRING_FUNCTIONS), so the ESP8266 build is the same size as before the previous commit. Co-Authored-By: Claude Opus 5.5 --- src/src/ESPEasyCore/ESPEasyRules.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/src/ESPEasyCore/ESPEasyRules.cpp b/src/src/ESPEasyCore/ESPEasyRules.cpp index 13f26f84c..fb8e64073 100644 --- a/src/src/ESPEasyCore/ESPEasyRules.cpp +++ b/src/src/ESPEasyCore/ESPEasyRules.cpp @@ -507,7 +507,7 @@ enum class string_commands_e { }; -void hideEscaped(String &line, bool &mustReplaceEscapedBracket, bool &mustReplaceEscapedCurlyBracket, bool &mustReplaceEscapedColon) { +static void hideEscaped(String &line, bool &mustReplaceEscapedBracket, bool &mustReplaceEscapedCurlyBracket, bool &mustReplaceEscapedColon) { String MaskEscapedBracket; if (hasEscapedCharacter(line,'(') || hasEscapedCharacter(line,')')) { @@ -541,14 +541,14 @@ void hideEscaped(String &line, bool &mustReplaceEscapedBracket, bool &mustReplac #endif // if FEATURE_EXTENDED_STRING_FUNCTIONS } -void hideMasked(String &line, bool mustReplaceMaskedChars) { +static void hideMasked(String &line, bool mustReplaceMaskedChars) { if (mustReplaceMaskedChars) { line.replace('{', static_cast(0x02)); line.replace('}', static_cast(0x03)); } } -void restoreMaskedAndEscaped(String &line, bool mustReplaceMaskedChars, bool mustReplaceEscapedBracket, bool mustReplaceEscapedCurlyBracket, bool mustReplaceEscapedColon) { +static void restoreMaskedAndEscaped(String &line, bool mustReplaceMaskedChars, bool mustReplaceEscapedBracket, bool mustReplaceEscapedCurlyBracket, bool mustReplaceEscapedColon) { String MaskEscapedBracket; if (mustReplaceMaskedChars) {