From 48f8f79317a04891e2becd859363add6eb2d6444 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sat, 1 Nov 2014 18:21:30 +0100 Subject: Add stdalgo::isin() and use it to simplify code --- src/modules/m_showfile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/m_showfile.cpp') 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(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 tag"); } else -- cgit v1.2.3