diff options
author | Jay Berkenbilt <ejb@ql.org> | 2010-09-24 21:09:22 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2010-09-24 21:09:22 +0200 |
commit | aa035961b38b6f01090e6f6a2ee4c9b9fb5041e8 (patch) | |
tree | 9fbdf139ac83bfe5231a8fc501a2408f912b216d /include | |
parent | 047bcfcaa605d8a3433bea27a1e82dc0067822c9 (diff) | |
download | qpdf-aa035961b38b6f01090e6f6a2ee4c9b9fb5041e8.tar.zst |
add * and -> operators
git-svn-id: svn+q:///qpdf/trunk@1029 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/PointerHolder.hh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/qpdf/PointerHolder.hh b/include/qpdf/PointerHolder.hh index ad5d1039..6ff69117 100644 --- a/include/qpdf/PointerHolder.hh +++ b/include/qpdf/PointerHolder.hh @@ -124,6 +124,24 @@ class PointerHolder return this->data->refcount; } + T const& operator*() const + { + return *this->data->pointer; + } + T& operator*() + { + return *this->data->pointer; + } + + T const* operator->() const + { + return this->data->pointer; + } + T* operator->() + { + return this->data->pointer; + } + private: void init(Data* data) { |