Numerous code style improvements

This commit is contained in:
Jack Andersen
2019-09-30 21:10:47 -10:00
parent 132c7def65
commit c7b6744509
11 changed files with 246 additions and 216 deletions

View File

@@ -27,16 +27,16 @@ struct YAMLNode {
YAMLNode(yaml_node_type_t type) : m_type(type) {}
const YAMLNode* findMapChild(std::string_view key) const {
YAMLNode* findMapChild(std::string_view key) const {
for (const auto& item : m_mapChildren)
if (!item.first.compare(key))
if (item.first == key)
return item.second.get();
return nullptr;
}
void assignMapChild(std::string_view key, std::unique_ptr<YAMLNode>&& node) {
for (auto& item : m_mapChildren)
if (!item.first.compare(key)) {
if (item.first == key) {
item.second = std::move(node);
return;
}