Fix compiler warnings associated with AnyMap

This commit is contained in:
Ray Speth 2017-06-17 22:47:28 -04:00
parent f69ef44600
commit 9c084d5c84
2 changed files with 2 additions and 2 deletions

View file

@ -244,7 +244,7 @@ inline AnyMap& AnyValue::as<AnyMap>() {
// This is where nested AnyMaps are created when the syntax
// m[key1][key2] is used.
if (m_value.type() == typeid(void)) {
m_value = std::move(AnyMap());
m_value = AnyMap();
}
return boost::any_cast<AnyMap&>(m_value);
} catch (boost::bad_any_cast&) {

View file

@ -73,7 +73,7 @@ AnyValue& AnyMap::operator[](const std::string& key)
if (iter == m_data.end()) {
// Create a new key
AnyValue& value = m_data.insert({head, AnyValue()}).first->second;
value = std::move(AnyMap());
value = AnyMap();
value.setKey(head);
return value.as<AnyMap>()[tail];
} else {