diff options
author | m-holger <m-holger@kubitscheck.org> | 2022-07-26 13:37:50 +0200 |
---|---|---|
committer | m-holger <m-holger@kubitscheck.org> | 2022-07-26 14:40:13 +0200 |
commit | 073808aa50f0c78e2d6fea4f56f0b814b314eb42 (patch) | |
tree | e2598b807a59cab41825d3b36f33dce45c7ba4de /libqpdf/JSON.cc | |
parent | d27edd54c4b077de66c40f681ff5d0e266952884 (diff) | |
download | qpdf-073808aa50f0c78e2d6fea4f56f0b814b314eb42.tar.zst |
Code tidy : replace 0 with nullptr or true
Diffstat (limited to 'libqpdf/JSON.cc')
-rw-r--r-- | libqpdf/JSON.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libqpdf/JSON.cc b/libqpdf/JSON.cc index 8f4e75a2..1796c859 100644 --- a/libqpdf/JSON.cc +++ b/libqpdf/JSON.cc @@ -204,7 +204,7 @@ JSON::JSON_blob::write(Pipeline* p, size_t) const void JSON::write(Pipeline* p, size_t depth) const { - if (0 == this->m->value.get()) { + if (nullptr == this->m->value.get()) { *p << "null"; } else { this->m->value->write(p, depth); @@ -270,7 +270,7 @@ JSON JSON::addDictionaryMember(std::string const& key, JSON const& val) { JSON_dictionary* obj = dynamic_cast<JSON_dictionary*>(this->m->value.get()); - if (0 == obj) { + if (nullptr == obj) { throw std::runtime_error( "JSON::addDictionaryMember called on non-dictionary"); } @@ -286,7 +286,7 @@ bool JSON::checkDictionaryKeySeen(std::string const& key) { JSON_dictionary* obj = dynamic_cast<JSON_dictionary*>(this->m->value.get()); - if (0 == obj) { + if (nullptr == obj) { throw std::logic_error( "JSON::checkDictionaryKey called on non-dictionary"); } @@ -307,7 +307,7 @@ JSON JSON::addArrayElement(JSON const& val) { JSON_array* arr = dynamic_cast<JSON_array*>(this->m->value.get()); - if (0 == arr) { + if (nullptr == arr) { throw std::runtime_error("JSON::addArrayElement called on non-array"); } if (val.m->value.get()) { |