aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_Dictionary.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-02-08 15:18:08 +0100
committerJay Berkenbilt <ejb@ql.org>2022-02-08 17:51:15 +0100
commitcb769c62e55599e9f980001830bc61d9fcaa64a9 (patch)
tree0bf980c385a61cbc8720cf990762ffc1200f9d6a /libqpdf/QPDF_Dictionary.cc
parent716381f65a2b2dc72f8da2426ba71aeab02c507f (diff)
downloadqpdf-cb769c62e55599e9f980001830bc61d9fcaa64a9.tar.zst
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.
Diffstat (limited to 'libqpdf/QPDF_Dictionary.cc')
-rw-r--r--libqpdf/QPDF_Dictionary.cc46
1 files changed, 23 insertions, 23 deletions
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<std::string, QPDFObjectHandle>::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<std::string, QPDFObjectHandle>::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<std::string, QPDFObjectHandle>::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<std::string> result;
for (std::map<std::string, QPDFObjectHandle>::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);
}
}