X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_showfile.cpp;h=132a2226765ece96cd62c7edf3dc44381310c1cb;hb=acccaa39641500b8a691db4136e6571102a438ed;hp=0f5d3ed1a00c8e556239edb9ed3d12934da6abad;hpb=a1d46b8bffb1dfce883d0a59b67a86934c260fba;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_showfile.cpp b/src/modules/m_showfile.cpp index 0f5d3ed1a..132a22267 100644 --- a/src/modules/m_showfile.cpp +++ b/src/modules/m_showfile.cpp @@ -104,7 +104,7 @@ class ModuleShowFile : public Module FileReader reader(file); CommandShowFile* sfcmd; - Command* handler = ServerInstance->Parser->GetHandler(cmdname); + Command* handler = ServerInstance->Parser.GetHandler(cmdname); if (handler) { // Command exists, check if it is ours @@ -127,12 +127,6 @@ class ModuleShowFile : public Module newcmds.push_back(sfcmd); } - static void DelAll(const std::vector& list) - { - for (std::vector::const_iterator i = list.begin(); i != list.end(); ++i) - delete *i; - } - public: void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE { @@ -157,13 +151,13 @@ class ModuleShowFile : public Module std::sort(newcmds.begin(), newcmds.end()); std::set_difference(cmds.begin(), cmds.end(), newcmds.begin(), newcmds.end(), removed.begin()); - DelAll(removed); + stdalgo::delete_all(removed); cmds.swap(newcmds); } ~ModuleShowFile() { - DelAll(cmds); + stdalgo::delete_all(cmds); } Version GetVersion() CXX11_OVERRIDE