diff --git a/include/sta/Property.hh b/include/sta/Property.hh index 7e19b15c..ae94d715 100644 --- a/include/sta/Property.hh +++ b/include/sta/Property.hh @@ -46,17 +46,16 @@ template class PropertyRegistry { public: - void defineProperty(const std::string property, - std::function handler); + typedef std::function PropertyHandler; + void defineProperty(const std::string &property, + PropertyHandler handler); PropertyValue getProperty(TYPE object, - const std::string property, + const std::string &property, const char *type_name, Sta *sta); private: - std::map> registry_; + std::map registry_; }; class Properties diff --git a/search/Property.cc b/search/Property.cc index 1613e3ae..308803a9 100644 --- a/search/Property.cc +++ b/search/Property.cc @@ -1384,7 +1384,7 @@ Properties::defineProperty(std::string property, template PropertyValue PropertyRegistry::getProperty(TYPE object, - const std::string property, + const std::string &property, const char *type_name, Sta *sta) @@ -1398,9 +1398,8 @@ PropertyRegistry::getProperty(TYPE object, template void -PropertyRegistry::defineProperty(const std::string property, - std::function handler) +PropertyRegistry::defineProperty(const std::string &property, + PropertyHandler handler) { registry_[property] = handler; }