Skip to content

Commit 476424d

Browse files
committed
lipstick
1 parent ac22156 commit 476424d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/include/moveit/task_constructor/properties.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ class PropertyMap
317317
/// allow initialization from given source for listed properties - always using the same name
318318
void configureInitFrom(Property::SourceFlags source, const std::set<std::string>& properties = {});
319319

320-
/// set (and, if neccessary, declare) the value of a property
320+
/// set (and, if necessary, declare) the value of a property
321321
template <typename T>
322322
void set(const std::string& name, const T& value) {
323323
auto it = props_.find(name);

core/src/properties.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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
193193
Property& 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 {
269269
size_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

Comments
 (0)