Fix compiler warnings associated with AnyMap
This commit is contained in:
parent
f69ef44600
commit
9c084d5c84
2 changed files with 2 additions and 2 deletions
|
|
@ -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&) {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue