@@ -54,7 +54,7 @@ class PropertyTypeRegistry
5454 PropertySerializerBase::SerializeFunction serialize_;
5555 PropertySerializerBase::DeserializeFunction deserialize_;
5656 };
57- Entry dummy_;
57+ const Entry dummy_;
5858
5959 // map from type_info to corresponding converter functions
6060 using RegistryMap = std::map<std::type_index, Entry>;
@@ -193,7 +193,7 @@ Property& Property::configureInitFrom(SourceFlags source, const std::string& nam
193193Property& PropertyMap::declare (const std::string& name, const Property::type_info& type_info,
194194 const std::string& description, const boost::any& default_value) {
195195 auto it_inserted = props_.insert (std::make_pair (name, Property (type_info, description, default_value)));
196- // if name was already declared, the new declaration should match in type (except it was boost::any)
196+ // if name was already declared, the new declaration should match in type (except if it was boost::any)
197197 if (!it_inserted.second && it_inserted.first ->second .type_info_ != typeid (boost::any) &&
198198 type_info != it_inserted.first ->second .type_info_ )
199199 throw Property::type_error (type_info.name (), it_inserted.first ->second .type_info_ .name ());
@@ -269,7 +269,7 @@ const boost::any& PropertyMap::get(const std::string& name) const {
269269size_t PropertyMap::countDefined (const std::vector<std::string>& list) const {
270270 size_t count = 0u ;
271271 for (const std::string& name : list) {
272- if (!get (name).empty ())
272+ if (!property (name).defined ())
273273 ++count;
274274 }
275275 return count;
0 commit comments