From e3d0c98e5a867518800bc79c18f7b13755c056e0 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 20 Oct 2008 22:47:07 +0200 Subject: Einige Verbesserungen am ConfigManager --- src/Common/ConfigManager.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/Common/ConfigManager.cpp') diff --git a/src/Common/ConfigManager.cpp b/src/Common/ConfigManager.cpp index 20a6110..a7270e2 100644 --- a/src/Common/ConfigManager.cpp +++ b/src/Common/ConfigManager.cpp @@ -31,11 +31,19 @@ namespace Common { ConfigManager ConfigManager::configManager; +bool ConfigManager::Compare::operator() (const Configurable *c1, const Configurable *c2) { + if(c1->getPriority() != c2->getPriority()) + return c1->getPriority() > c2->getPriority(); + else + return c1 < c2; +} + + void ConfigManager::handleConfigEntry(const std::vector > &entry) { bool handled = false; for(std::set::iterator c = configurables.begin(); c != configurables.end(); ++c) { - if((*c)->handleConfigEntry(entry)) + if((*c)->handleConfigEntry(entry, handled)) handled = true; } -- cgit v1.2.3