Skip to content

Commit

Permalink
[Fix] Update Picojson (#327)
Browse files Browse the repository at this point in the history
This PR adds a `const value& operator[](const std::string& key) const`
method to picojson object
  • Loading branch information
Ubospica authored Nov 11, 2024
1 parent 35a317f commit 79a69ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 3rdparty/picojson/picojson.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ class object_with_ordered_keys : private std::unordered_map<std::string, value>
return std::unordered_map<std::string, value>::operator[](key);
}

const value& operator[](const std::string& key) const {
return std::unordered_map<std::string, value>::at(key);
}

void clear() {
std::unordered_map<std::string, value>::clear();
ordered_keys_.clear();
Expand Down

0 comments on commit 79a69ae

Please sign in to comment.