From 073808aa50f0c78e2d6fea4f56f0b814b314eb42 Mon Sep 17 00:00:00 2001 From: m-holger Date: Tue, 26 Jul 2022 12:37:50 +0100 Subject: Code tidy : replace 0 with nullptr or true --- libqpdf/JSON.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libqpdf/JSON.cc') 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(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(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(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()) { -- cgit v1.2.3-54-g00ecf