aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/parsing.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2020-11-10 08:49:27 -0500
committerJack Lloyd <[email protected]>2020-11-10 08:49:27 -0500
commit80f7ad77e3faa944cba045a11f58e5c90cbf7415 (patch)
tree8d44e41e04eafb1d2e7370a20ff95a0e008df127 /src/lib/utils/parsing.cpp
parentf227c7ef3eefdfe9bd7798adc5ed658dc078d0be (diff)
Remove split_on_pred
Diffstat (limited to 'src/lib/utils/parsing.cpp')
-rw-r--r--src/lib/utils/parsing.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/lib/utils/parsing.cpp b/src/lib/utils/parsing.cpp
index 13cb26f24..7d6d9c6d6 100644
--- a/src/lib/utils/parsing.cpp
+++ b/src/lib/utils/parsing.cpp
@@ -116,19 +116,13 @@ std::vector<std::string> parse_algorithm_name(const std::string& namex)
std::vector<std::string> split_on(const std::string& str, char delim)
{
- return split_on_pred(str, [delim](char c) { return c == delim; });
- }
-
-std::vector<std::string> split_on_pred(const std::string& str,
- std::function<bool (char)> pred)
- {
std::vector<std::string> elems;
if(str.empty()) return elems;
std::string substr;
for(auto i = str.begin(); i != str.end(); ++i)
{
- if(pred(*i))
+ if(*i == delim)
{
if(!substr.empty())
elems.push_back(substr);