From bf97e23fb623c05825df7384ffc5b0ece4225244 Mon Sep 17 00:00:00 2001 From: Misa Date: Thu, 18 Feb 2021 00:08:31 -0800 Subject: [PATCH] Add static keywords to replace_all and tag finder funcs These functions will never be used outside editor.cpp; they should therefore be marked with the `static` keyword. --- desktop_version/src/editor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop_version/src/editor.cpp b/desktop_version/src/editor.cpp index ce9ce2e6..0be8caac 100644 --- a/desktop_version/src/editor.cpp +++ b/desktop_version/src/editor.cpp @@ -97,7 +97,7 @@ void editorclass::loadZips() if (needsReload) directoryList = FILESYSTEM_getLevelDirFileNames(); } -void replace_all(std::string& str, const std::string& from, const std::string& to) +static void replace_all(std::string& str, const std::string& from, const std::string& to) { if (from.empty()) { @@ -113,7 +113,7 @@ void replace_all(std::string& str, const std::string& from, const std::string& t } } -std::string find_tag(const std::string& buf, const std::string& start, const std::string& end) +static std::string find_tag(const std::string& buf, const std::string& start, const std::string& end) { size_t tag = buf.find(start); @@ -186,7 +186,7 @@ std::string find_tag(const std::string& buf, const std::string& start, const std } #define TAG_FINDER(NAME, TAG) \ -std::string NAME(const std::string& buf) \ +static std::string NAME(const std::string& buf) \ { \ return find_tag(buf, "<" TAG ">", ""); \ }