diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2016-04-06 16:49:18 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2016-04-06 16:49:18 -0700 |
commit | 458077ccb4f7eddc94549528c3a9809745982352 (patch) | |
tree | 39cb7c59737895b757c0a830b166d6ed69e83027 /upb/upb.h | |
parent | d0b9d0a9b782e46a483d4d72515f9ab4f72e402a (diff) | |
parent | 8823fa6069452c86325b4d5a6065a0d4fd67f1a2 (diff) |
Merge pull request #53 from haberman/filedef
Added upb::FileDef, which represents the file defs are declared in.
Diffstat (limited to 'upb/upb.h')
-rw-r--r-- | upb/upb.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -299,6 +299,11 @@ template <class T> class reffed_ptr { if (ptr_) ptr_->Ref(this); } + reffed_ptr(const reffed_ptr& other) + : ptr_(upb::upcast(other.get())) { + if (ptr_) ptr_->Ref(this); + } + ~reffed_ptr() { if (ptr_) ptr_->Unref(this); } template <class U> |