diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2016-05-12 11:54:34 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2016-05-12 11:54:34 -0700 |
commit | fa338b70a602d9f5657528d0322535959a92d4b0 (patch) | |
tree | a7ec8b8d61a1ff3657aff99316ec51a8b81726ad /upb/refcounted.h | |
parent | e16ed470be7d0d459e85e1d7b43893358a625d34 (diff) |
Added UPB_ASSERT() that helps avoid unused var warnings.
* Added UPB_ASSERT() that helps avoid unused var warnings.
* Addressed PR comments.
* Fixed assert in the JIT.
Diffstat (limited to 'upb/refcounted.h')
-rw-r--r-- | upb/refcounted.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/upb/refcounted.h b/upb/refcounted.h index 115fc43..6698d38 100644 --- a/upb/refcounted.h +++ b/upb/refcounted.h @@ -258,7 +258,7 @@ template <class T> class upb::reffed_ptr { reffed_ptr(U* val, const void* ref_donor = NULL) : ptr_(upb::upcast(val)) { if (ref_donor) { - assert(ptr_); + UPB_ASSERT(ptr_); ptr_->DonateRef(ref_donor, this); } else if (ptr_) { ptr_->Ref(this); @@ -303,12 +303,12 @@ template <class T> class upb::reffed_ptr { } T& operator*() const { - assert(ptr_); + UPB_ASSERT(ptr_); return *ptr_; } T* operator->() const { - assert(ptr_); + UPB_ASSERT(ptr_); return ptr_; } |