@@ -54,7 +54,7 @@ class PropertyTypeRegistry
54
54
PropertySerializerBase::SerializeFunction serialize_;
55
55
PropertySerializerBase::DeserializeFunction deserialize_;
56
56
};
57
- Entry dummy_;
57
+ const Entry dummy_;
58
58
59
59
// map from type_info to corresponding converter functions
60
60
using RegistryMap = std::map<std::type_index, Entry>;
@@ -193,7 +193,7 @@ Property& Property::configureInitFrom(SourceFlags source, const std::string& nam
193
193
Property& PropertyMap::declare (const std::string& name, const Property::type_info& type_info,
194
194
const std::string& description, const boost::any& default_value) {
195
195
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)
197
197
if (!it_inserted.second && it_inserted.first ->second .type_info_ != typeid (boost::any) &&
198
198
type_info != it_inserted.first ->second .type_info_ )
199
199
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 {
269
269
size_t PropertyMap::countDefined (const std::vector<std::string>& list) const {
270
270
size_t count = 0u ;
271
271
for (const std::string& name : list) {
272
- if (!get (name).empty ())
272
+ if (!property (name).defined ())
273
273
++count;
274
274
}
275
275
return count;
0 commit comments