mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-25 10:14:58 +01: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:
parent
141181dee7
commit
bf97e23fb6
1 changed files with 3 additions and 3 deletions
|
@ -97,7 +97,7 @@ void editorclass::loadZips()
|
||||||
if (needsReload) directoryList = FILESYSTEM_getLevelDirFileNames();
|
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())
|
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);
|
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) \
|
#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 ">"); \
|
return find_tag(buf, "<" TAG ">", "</" TAG ">"); \
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue