]> git.stg.codes - stg.git/commitdiff
All right in GetParamValue and GetPropertyValue
authorNaffanya <naffanya@naffanya.(none)>
Tue, 12 Nov 2013 23:57:01 +0000 (01:57 +0200)
committerNaffanya <naffanya@naffanya.(none)>
Tue, 12 Nov 2013 23:57:01 +0000 (01:57 +0200)
include/stg/user_property.h

index 474eba6a08305d4128d0ae42896b018e265f7a39..6eb17666487952be8147d4bd761e9e49e1d9596a 100644 (file)
@@ -33,7 +33,7 @@ public:
 };
 //-----------------------------------------------------------------------------
 template<typename varT>
-class USER_PROPERTY : USER_PROPERTY_BASE {
+class USER_PROPERTY : public USER_PROPERTY_BASE {
 public:
     USER_PROPERTY(varT & val);
     virtual ~USER_PROPERTY();
@@ -124,7 +124,7 @@ private:
     USER_STAT stat;
     USER_CONF conf;
 
-    std::map<std::string, USER_PROPERTY_BASE*> properties;
+    std::map<std::string, USER_PROPERTY_BASE*> properties;
 public:
     USER_PROPERTIES(const std::string & sd);
 
@@ -390,7 +390,7 @@ else
 inline
 std::string USER_PROPERTIES::GetPropertyValue(const std::string & name) const
 {
-std::map<std::string, USER_PROPERTY_BASE*>::iterator it = properties.find(name);
+std::map<std::string, USER_PROPERTY_BASE*>::const_iterator it = properties.find(name);
 if (it == properties.end())
     return "";
 return it->second->ToString();