diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-05-18 00:28:50 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-05-20 15:16:25 +0200 |
commit | 56f1b411feeb58b55e92ee77daffaa49c51b7dad (patch) | |
tree | 4337c0ada5ccc979f89af9aecf0873c087329c05 /libqpdf/QPDFObjectHandle.cc | |
parent | 7e7a9c437982b7ede2af9cd0b12b3e47b4bc3a3d (diff) | |
download | qpdf-56f1b411feeb58b55e92ee77daffaa49c51b7dad.tar.zst |
Back out fluent QPDFObjectHandle methods. Keep the andGet methods.
I decided these were confusing and inconsistent with how JSON works.
They muddle the API rather than improving it.
Diffstat (limited to 'libqpdf/QPDFObjectHandle.cc')
-rw-r--r-- | libqpdf/QPDFObjectHandle.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc index 4a0a69ae..f3d1883a 100644 --- a/libqpdf/QPDFObjectHandle.cc +++ b/libqpdf/QPDFObjectHandle.cc @@ -959,7 +959,7 @@ QPDFObjectHandle::setArrayFromVector(std::vector<QPDFObjectHandle> const& items) } } -QPDFObjectHandle& +void QPDFObjectHandle::insertItem(int at, QPDFObjectHandle const& item) { if (isArray()) { @@ -968,7 +968,6 @@ QPDFObjectHandle::insertItem(int at, QPDFObjectHandle const& item) typeWarning("array", "ignoring attempt to insert item"); QTC::TC("qpdf", "QPDFObjectHandle array ignoring insert item"); } - return *this; } QPDFObjectHandle @@ -978,7 +977,7 @@ QPDFObjectHandle::insertItemAndGet(int at, QPDFObjectHandle const& item) return item; } -QPDFObjectHandle& +void QPDFObjectHandle::appendItem(QPDFObjectHandle const& item) { if (isArray()) { @@ -988,7 +987,6 @@ QPDFObjectHandle::appendItem(QPDFObjectHandle const& item) typeWarning("array", "ignoring attempt to append item"); QTC::TC("qpdf", "QPDFObjectHandle array ignoring append item"); } - return *this; } QPDFObjectHandle @@ -998,7 +996,7 @@ QPDFObjectHandle::appendItemAndGet(QPDFObjectHandle const& item) return item; } -QPDFObjectHandle& +void QPDFObjectHandle::eraseItem(int at) { if (isArray() && (at < getArrayNItems()) && (at >= 0)) { @@ -1012,7 +1010,6 @@ QPDFObjectHandle::eraseItem(int at) QTC::TC("qpdf", "QPDFObjectHandle array ignoring erase item"); } } - return *this; } QPDFObjectHandle @@ -1289,7 +1286,7 @@ QPDFObjectHandle::getOwningQPDF() // Dictionary mutators -QPDFObjectHandle& +void QPDFObjectHandle::replaceKey( std::string const& key, QPDFObjectHandle const& value) { @@ -1300,7 +1297,6 @@ QPDFObjectHandle::replaceKey( typeWarning("dictionary", "ignoring key replacement request"); QTC::TC("qpdf", "QPDFObjectHandle dictionary ignoring replaceKey"); } - return *this; } QPDFObjectHandle @@ -1311,7 +1307,7 @@ QPDFObjectHandle::replaceKeyAndGet( return value; } -QPDFObjectHandle& +void QPDFObjectHandle::removeKey(std::string const& key) { if (isDictionary()) { @@ -1320,7 +1316,6 @@ QPDFObjectHandle::removeKey(std::string const& key) typeWarning("dictionary", "ignoring key removal request"); QTC::TC("qpdf", "QPDFObjectHandle dictionary ignoring removeKey"); } - return *this; } QPDFObjectHandle |