summaryrefslogtreecommitdiff
path: root/src/configparser.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-11-01 18:21:30 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-11-01 18:21:30 +0100
commit48f8f79317a04891e2becd859363add6eb2d6444 (patch)
treef92d080a4b552df405470662a31fc5e4a923882d /src/configparser.cpp
parentfbc73e20784b055485f676096e758d6aeed62e0c (diff)
Add stdalgo::isin() and use it to simplify code
Diffstat (limited to 'src/configparser.cpp')
-rw-r--r--src/configparser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/configparser.cpp b/src/configparser.cpp
index 89ad6493a..6b0d8fa04 100644
--- a/src/configparser.cpp
+++ b/src/configparser.cpp
@@ -367,7 +367,7 @@ void ParseStack::DoReadFile(const std::string& key, const std::string& name, int
bool ParseStack::ParseFile(const std::string& path, int flags, const std::string& mandatory_tag, bool isexec)
{
ServerInstance->Logs->Log("CONFIG", LOG_DEBUG, "Reading (isexec=%d) %s", isexec, path.c_str());
- if (std::find(reading.begin(), reading.end(), path) != reading.end())
+ if (stdalgo::isin(reading, path))
throw CoreException((isexec ? "Executable " : "File ") + path + " is included recursively (looped inclusion)");
/* It's not already included, add it to the list of files we've loaded */