Pass const object to has_json_object_field.
GitOrigin-RevId: 7e7dfda846e15e8b977674e4c3a3ab759720449c
This commit is contained in:
parent
035e4a69ed
commit
4378f96948
@ -576,7 +576,7 @@ Slice JsonValue::get_type_name(Type type) {
|
||||
}
|
||||
}
|
||||
|
||||
bool has_json_object_field(JsonObject &object, Slice name) {
|
||||
bool has_json_object_field(const JsonObject &object, Slice name) {
|
||||
for (auto &field_value : object) {
|
||||
if (field_value.first == name) {
|
||||
return true;
|
||||
|
@ -816,7 +816,7 @@ auto json_array(const A &a, F &&f) {
|
||||
});
|
||||
}
|
||||
|
||||
bool has_json_object_field(JsonObject &object, Slice name);
|
||||
bool has_json_object_field(const JsonObject &object, Slice name);
|
||||
|
||||
Result<JsonValue> get_json_object_field(JsonObject &object, Slice name, JsonValue::Type type,
|
||||
bool is_optional = true) TD_WARN_UNUSED_RESULT;
|
||||
|
Loading…
Reference in New Issue
Block a user