From cb769c62e55599e9f980001830bc61d9fcaa64a9 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Tue, 8 Feb 2022 09:18:08 -0500 Subject: WHITESPACE ONLY -- expand tabs in source code This comment expands all tabs using an 8-character tab-width. You should ignore this commit when using git blame or use git blame -w. In the early days, I used to use tabs where possible for indentation, since emacs did this automatically. In recent years, I have switched to only using spaces, which means qpdf source code has been a mixture of spaces and tabs. I have avoided cleaning this up because of not wanting gratuitous whitespaces change to cloud the output of git blame, but I changed my mind after discussing with users who view qpdf source code in editors/IDEs that have other tab widths by default and in light of the fact that I am planning to start applying automatic code formatting soon. --- libqpdf/QPDF_Dictionary.cc | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'libqpdf/QPDF_Dictionary.cc') diff --git a/libqpdf/QPDF_Dictionary.cc b/libqpdf/QPDF_Dictionary.cc index 1301d46f..918b46b4 100644 --- a/libqpdf/QPDF_Dictionary.cc +++ b/libqpdf/QPDF_Dictionary.cc @@ -17,10 +17,10 @@ void QPDF_Dictionary::releaseResolved() { for (std::map::iterator iter = - this->items.begin(); - iter != this->items.end(); ++iter) + this->items.begin(); + iter != this->items.end(); ++iter) { - QPDFObjectHandle::ReleaseResolver::releaseResolved((*iter).second); + QPDFObjectHandle::ReleaseResolver::releaseResolved((*iter).second); } } @@ -29,11 +29,11 @@ QPDF_Dictionary::unparse() { std::string result = "<< "; for (std::map::iterator iter = - this->items.begin(); - iter != this->items.end(); ++iter) + this->items.begin(); + iter != this->items.end(); ++iter) { - result += QPDF_Name::normalizeName((*iter).first) + - " " + (*iter).second.unparse() + " "; + result += QPDF_Name::normalizeName((*iter).first) + + " " + (*iter).second.unparse() + " "; } result += ">>"; return result; @@ -44,8 +44,8 @@ QPDF_Dictionary::getJSON() { JSON j = JSON::makeDictionary(); for (std::map::iterator iter = - this->items.begin(); - iter != this->items.end(); ++iter) + this->items.begin(); + iter != this->items.end(); ++iter) { j.addDictionaryMember(QPDF_Name::normalizeName((*iter).first), (*iter).second.getJSON()); @@ -75,7 +75,7 @@ bool QPDF_Dictionary::hasKey(std::string const& key) { return ((this->items.count(key) > 0) && - (! this->items[key].isNull())); + (! this->items[key].isNull())); } QPDFObjectHandle @@ -85,8 +85,8 @@ QPDF_Dictionary::getKey(std::string const& key) // returns the null object. if (this->items.count(key)) { - // May be a null object - return (*(this->items.find(key))).second; + // May be a null object + return (*(this->items.find(key))).second; } else { @@ -98,7 +98,7 @@ QPDF_Dictionary::getKey(std::string const& key) null.setObjectDescription( qpdf, description + " -> dictionary key " + key); } - return null; + return null; } } @@ -107,13 +107,13 @@ QPDF_Dictionary::getKeys() { std::set result; for (std::map::const_iterator iter = - this->items.begin(); - iter != this->items.end(); ++iter) + this->items.begin(); + iter != this->items.end(); ++iter) { - if (hasKey((*iter).first)) - { - result.insert((*iter).first); - } + if (hasKey((*iter).first)) + { + result.insert((*iter).first); + } } return result; } @@ -126,7 +126,7 @@ QPDF_Dictionary::getAsMap() const void QPDF_Dictionary::replaceKey(std::string const& key, - QPDFObjectHandle value) + QPDFObjectHandle value) { // add or replace value this->items[key] = value; @@ -141,14 +141,14 @@ QPDF_Dictionary::removeKey(std::string const& key) void QPDF_Dictionary::replaceOrRemoveKey(std::string const& key, - QPDFObjectHandle value) + QPDFObjectHandle value) { if (value.isNull()) { - removeKey(key); + removeKey(key); } else { - replaceKey(key, value); + replaceKey(key, value); } } -- cgit v1.2.3-54-g00ecf