1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-09-28 17:27:23 +02:00

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.
This commit is contained in:
Misa 2021-02-18 00:08:31 -08:00 committed by Ethan Lee
parent 141181dee7
commit bf97e23fb6

View file

@ -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 ">", "</" TAG ">"); \
}