From 5636fad174f0bcff857c357c394c4cc8d424b302 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 17 Aug 2009 11:40:15 +0000 Subject: reload entity/info models on r_restart --- src/core/info.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/core/info.cc') diff --git a/src/core/info.cc b/src/core/info.cc index 4e0cb53..93837c0 100644 --- a/src/core/info.cc +++ b/src/core/info.cc @@ -12,7 +12,7 @@ namespace core { -Info::Registry Info::registry; +Info::Registry Info::info_registry; Info::Info(const std::string & label) { @@ -137,12 +137,12 @@ void Info::add(Info *info) if (find(info->label())) return; - registry[info->label()] = info; + info_registry[info->label()] = info; } Info *Info::find(const char *label) { - for (Registry::iterator it = registry.begin(); it != registry.end(); it++) { + for (Registry::iterator it = info_registry.begin(); it != info_registry.end(); it++) { Info *info = (*it).second; if (info->label().compare(label) == 0) { return info; @@ -153,7 +153,7 @@ Info *Info::find(const char *label) Info *Info::find(const std::string & label) { - for (Registry::iterator it = registry.begin(); it != registry.end(); it++) { + for (Registry::iterator it = info_registry.begin(); it != info_registry.end(); it++) { Info *info = (*it).second; if (info->label().compare(label) == 0) { return info; @@ -164,20 +164,20 @@ Info *Info::find(const std::string & label) void Info::clear() { - for (Registry::iterator it = registry.begin(); it != registry.end(); it++) { + for (Registry::iterator it = info_registry.begin(); it != info_registry.end(); it++) { Info *info = (*it).second;; delete info; } - registry.clear(); + info_registry.clear(); } void Info::list() { - for (Registry::iterator it = registry.begin(); it != registry.end(); it++) { + for (Registry::iterator it = info_registry.begin(); it != info_registry.end(); it++) { Info *info = (*it).second;; con_print << info->label() << std::endl; } - con_print << registry.size() << " registered info " << aux::plural("record", registry.size()) << std::endl; + con_print << info_registry.size() << " registered info " << aux::plural("record", info_registry.size()) << std::endl; } } -- cgit v1.2.3