diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-11-01 18:21:30 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-11-01 18:21:30 +0100 |
commit | 48f8f79317a04891e2becd859363add6eb2d6444 (patch) | |
tree | f92d080a4b552df405470662a31fc5e4a923882d /src/modules.cpp | |
parent | fbc73e20784b055485f676096e758d6aeed62e0c (diff) |
Add stdalgo::isin() and use it to simplify code
Diffstat (limited to 'src/modules.cpp')
-rw-r--r-- | src/modules.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index 4c0af3bac..05a1552f4 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -178,7 +178,7 @@ ModuleManager::~ModuleManager() bool ModuleManager::Attach(Implementation i, Module* mod) { - if (std::find(EventHandlers[i].begin(), EventHandlers[i].end(), mod) != EventHandlers[i].end()) + if (stdalgo::isin(EventHandlers[i], mod)) return false; EventHandlers[i].push_back(mod); |