summaryrefslogtreecommitdiff
path: root/upb/bindings/googlepb/bridge.h
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2016-05-12 11:54:34 -0700
committerJoshua Haberman <jhaberman@gmail.com>2016-05-12 11:54:34 -0700
commitfa338b70a602d9f5657528d0322535959a92d4b0 (patch)
treea7ec8b8d61a1ff3657aff99316ec51a8b81726ad /upb/bindings/googlepb/bridge.h
parente16ed470be7d0d459e85e1d7b43893358a625d34 (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/bindings/googlepb/bridge.h')
-rw-r--r--upb/bindings/googlepb/bridge.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/upb/bindings/googlepb/bridge.h b/upb/bindings/googlepb/bridge.h
index ec8ac41..ce55dc6 100644
--- a/upb/bindings/googlepb/bridge.h
+++ b/upb/bindings/googlepb/bridge.h
@@ -128,7 +128,7 @@ class DefBuilder {
template <class T>
T* AddToCache(const void *proto2_descriptor, reffed_ptr<T> def) {
- assert(def_cache_.find(proto2_descriptor) == def_cache_.end());
+ UPB_ASSERT(def_cache_.find(proto2_descriptor) == def_cache_.end());
def_cache_[proto2_descriptor] = def;
return def.get(); // Continued lifetime is guaranteed by cache.
}
@@ -207,7 +207,7 @@ class CodeCache {
const MessageDef* md, const ::google::protobuf::Message& m);
Handlers* AddToCache(const MessageDef* md, reffed_ptr<Handlers> handlers) {
- assert(handlers_cache_.find(md) == handlers_cache_.end());
+ UPB_ASSERT(handlers_cache_.find(md) == handlers_cache_.end());
handlers_cache_[md] = handlers;
return handlers.get(); // Continue lifetime is guaranteed by the cache.
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback