Util: Add Json::Value at() functions

This commit is contained in:
Riyyi
2022-07-08 13:55:40 +02:00
parent 4487c800df
commit a209452a68
6 changed files with 41 additions and 12 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ void Object::emplace(const std::string& name, Value value)
m_members.emplace(name, std::move(value));
}
Value& Object::at(const std::string& name)
Value& Object::operator[](const std::string& name)
{
if (m_members.find(name) == m_members.end()) {
emplace(name, {});