diff options
| author | 2014-11-01 18:21:30 +0100 | |
|---|---|---|
| committer | 2014-11-01 18:21:30 +0100 | |
| commit | 48f8f79317a04891e2becd859363add6eb2d6444 (patch) | |
| tree | f92d080a4b552df405470662a31fc5e4a923882d /src/modules/m_showfile.cpp | |
| parent | Add stdalgo::erase() and use it to simplify code (diff) | |
| download | inspircd++-48f8f79317a04891e2becd859363add6eb2d6444.tar.gz inspircd++-48f8f79317a04891e2becd859363add6eb2d6444.tar.bz2 inspircd++-48f8f79317a04891e2becd859363add6eb2d6444.zip | |
Add stdalgo::isin() and use it to simplify code
Diffstat (limited to 'src/modules/m_showfile.cpp')
| -rw-r--r-- | src/modules/m_showfile.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/m_showfile.cpp b/src/modules/m_showfile.cpp index 132a22267..cb51c4387 100644 --- a/src/modules/m_showfile.cpp +++ b/src/modules/m_showfile.cpp @@ -113,7 +113,7 @@ class ModuleShowFile : public Module // This is our command, make sure we don't have the same entry twice sfcmd = static_cast<CommandShowFile*>(handler); - if (std::find(newcmds.begin(), newcmds.end(), sfcmd) != newcmds.end()) + if (stdalgo::isin(newcmds, sfcmd)) throw ModuleException("Command " + cmdname + " is already used in a <showfile> tag"); } else |
