diff options
author | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2023-05-20 17:29:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-20 17:29:09 +0200 |
commit | fd17c8e3fe38a56abf50ce0edec1cde48d4f74cb (patch) | |
tree | c1efea1b140cac94dbaf496ae6ec5e0a621daa07 /libqpdf/JSON.cc | |
parent | a6d7b79e65941238871c0c3d7d06b9bf246213ba (diff) | |
parent | e6577a1323cd813a92ddbc8841e1342c05de071a (diff) | |
download | qpdf-fd17c8e3fe38a56abf50ce0edec1cde48d4f74cb.tar.zst |
Merge pull request #963 from m-holger/tidy
Code tidy
Diffstat (limited to 'libqpdf/JSON.cc')
-rw-r--r-- | libqpdf/JSON.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libqpdf/JSON.cc b/libqpdf/JSON.cc index fbf06f88..5f76f1ec 100644 --- a/libqpdf/JSON.cc +++ b/libqpdf/JSON.cc @@ -294,7 +294,7 @@ JSON::addDictionaryMember(std::string const& key, JSON const& val) bool JSON::checkDictionaryKeySeen(std::string const& key) { - JSON_dictionary* obj = dynamic_cast<JSON_dictionary*>(this->m->value.get()); + auto* obj = dynamic_cast<JSON_dictionary*>(this->m->value.get()); if (nullptr == obj) { throw std::logic_error( "JSON::checkDictionaryKey called on non-dictionary"); @@ -315,7 +315,7 @@ JSON::makeArray() JSON JSON::addArrayElement(JSON const& val) { - JSON_array* arr = dynamic_cast<JSON_array*>(this->m->value.get()); + auto* arr = dynamic_cast<JSON_array*>(this->m->value.get()); if (nullptr == arr) { throw std::runtime_error("JSON::addArrayElement called on non-array"); } @@ -470,13 +470,13 @@ JSON::checkSchemaInternal( std::list<std::string>& errors, std::string prefix) { - JSON_array* this_arr = dynamic_cast<JSON_array*>(this_v); - JSON_dictionary* this_dict = dynamic_cast<JSON_dictionary*>(this_v); + auto* this_arr = dynamic_cast<JSON_array*>(this_v); + auto* this_dict = dynamic_cast<JSON_dictionary*>(this_v); - JSON_array* sch_arr = dynamic_cast<JSON_array*>(sch_v); - JSON_dictionary* sch_dict = dynamic_cast<JSON_dictionary*>(sch_v); + auto* sch_arr = dynamic_cast<JSON_array*>(sch_v); + auto* sch_dict = dynamic_cast<JSON_dictionary*>(sch_v); - JSON_string* sch_str = dynamic_cast<JSON_string*>(sch_v); + auto* sch_str = dynamic_cast<JSON_string*>(sch_v); std::string err_prefix; if (prefix.empty()) { |