aboutsummaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-01-18 16:49:09 +0000
committerGravatar Sadie Powell2022-01-18 16:54:04 +0000
commitd216fd0af570782b8c82a51f92f2d02067132efc (patch)
tree700f41cdc575ed6bc044518912a6afdc3d66d64f /src/helperfuncs.cpp
parentMove FilePosition to be with the config stuff it is used by. (diff)
Use vector<string> instead of file_cache in ProcessColors.
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index 5ca4d4b87..910f0fe32 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -99,7 +99,7 @@ void InspIRCd::StripColor(std::string &sentence)
}
}
-void InspIRCd::ProcessColors(file_cache& input)
+void InspIRCd::ProcessColors(std::vector<std::string>& input)
{
/*
* Replace all color codes from the special[] array to actual
@@ -127,9 +127,8 @@ void InspIRCd::ProcessColors(file_cache& input)
special_chars("", "")
};
- for(file_cache::iterator it = input.begin(), it_end = input.end(); it != it_end; it++)
+ for (auto& ret : input)
{
- std::string ret = *it;
for(int i = 0; special[i].character.empty() == false; ++i)
{
std::string::size_type pos = ret.find(special[i].character);
@@ -154,7 +153,6 @@ void InspIRCd::ProcessColors(file_cache& input)
ret = ret.substr(0, pos) + "\\" + ret.substr(pos + 2);
pos = ret.find("\\\\", pos + 1);
}
- *it = ret;
}
}