use emplace
Allows removing the constructor name as emplace forwards the arguments directly. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -790,7 +790,7 @@ void Task::parseJSON (const json::object* root_obj)
|
||||
name << "annotation_" << ann_timestamp;
|
||||
}
|
||||
|
||||
annos.insert (std::make_pair (name.str (), json::decode (what->_data)));
|
||||
annos.emplace (name.str (), json::decode (what->_data));
|
||||
}
|
||||
|
||||
setAnnotations (annos);
|
||||
|
||||
Reference in New Issue
Block a user