From 71f9f56c6dee0f8b1e7f6df93a56f95f4974d4d2 Mon Sep 17 00:00:00 2001 From: Naffanya Date: Sun, 2 Feb 2014 22:39:57 +0200 Subject: [PATCH] Add type REGISTRY in USER_PROPERTIES --- include/stg/user_property.h | 8 +++++--- projects/stargazer/user_impl.cpp | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/stg/user_property.h b/include/stg/user_property.h index f2421213..da60ff1c 100644 --- a/include/stg/user_property.h +++ b/include/stg/user_property.h @@ -121,11 +121,13 @@ class USER_PROPERTIES : private NONCOPYABLE { начале идет закрытая секция * */ +public: + typedef std::map REGISTRY; private: USER_STAT stat; USER_CONF conf; - std::map properties; + REGISTRY properties; public: USER_PROPERTIES(const std::string & sd); @@ -280,7 +282,7 @@ USER_PROPERTY_LOGGED::USER_PROPERTY_LOGGED(varT & val, bool isSt, STG_LOGGER & logger, const std::string & sd, - std::map & properties) + USER_PROPERTIES::REGISTRY & properties) : USER_PROPERTY(val), stgLogger(logger), @@ -392,7 +394,7 @@ else inline std::string USER_PROPERTIES::GetPropertyValue(const std::string & name) const { -std::map::const_iterator it = properties.find(ToLower(name)); +REGISTRY::const_iterator it = properties.find(ToLower(name)); if (it == properties.end()) return ""; return it->second->ToString(); diff --git a/projects/stargazer/user_impl.cpp b/projects/stargazer/user_impl.cpp index f6dd38f1..f15b182a 100644 --- a/projects/stargazer/user_impl.cpp +++ b/projects/stargazer/user_impl.cpp @@ -1521,7 +1521,7 @@ std::string USER_IMPL::GetParamValue(const std::string & name) const if (lowerName == "login") return login; if (lowerName == "currip") return currIP.ToString(); if (lowerName == "enableddirs") return GetEnabledDirs(); - if (property.Exists(lowerName)) + if (property.Exists(lowerName)) return property.GetPropertyValue(lowerName); else { -- 2.44.2