From 7890dccf61ba5e92d76e79c121b926ac515d6747 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Fri, 15 Oct 2010 08:53:21 +0300 Subject: services --- core/modules.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'core/modules.cpp') diff --git a/core/modules.cpp b/core/modules.cpp index b509c6f..09ee63b 100644 --- a/core/modules.cpp +++ b/core/modules.cpp @@ -1,6 +1,6 @@ #include "commonheaders.h" -std::list plugins; +extern std::list plugins; extern PLUGINLINK pluglink; @@ -80,12 +80,15 @@ void load_modules() } void run_plugins() -{ +{ //now for testing only if(!plugins.empty()) - for(std::list::iterator i = plugins.begin(); i != plugins.end(); i++) { - (*i)->get_exported_functions()->Load(&pluglink); - (*i)->get_exported_functions()->OnModulesLoaded(); + std::list::iterator end = plugins.end(); + for(std::list::iterator i = plugins.begin(); i != end; ++i) + { + (*i)->get_exported_functions()->Load(&pluglink); + (*i)->get_exported_functions()->OnModulesLoaded(); + } } } -- cgit v1.2.3