From 874e382fde23bb169a2a9cb0f28063c54f8eed4e Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Mon, 13 Mar 2017 16:07:42 -0700 Subject: Replace CHECK() with GOOGLE_CHECK(). Fixes: https://github.com/google/protobuf/issues/1175 --- src/google/protobuf/stubs/shared_ptr.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/google/protobuf/stubs/shared_ptr.h b/src/google/protobuf/stubs/shared_ptr.h index d250bf4d..7da114e9 100644 --- a/src/google/protobuf/stubs/shared_ptr.h +++ b/src/google/protobuf/stubs/shared_ptr.h @@ -428,11 +428,11 @@ class enable_shared_from_this { shared_ptr shared_from_this() { // Behavior is undefined if the precondition isn't satisfied; we choose // to die with a CHECK failure. - CHECK(!weak_this_.expired()) << "No shared_ptr owns this object"; + GOOGLE_CHECK(!weak_this_.expired()) << "No shared_ptr owns this object"; return weak_this_.lock(); } shared_ptr shared_from_this() const { - CHECK(!weak_this_.expired()) << "No shared_ptr owns this object"; + GOOGLE_CHECK(!weak_this_.expired()) << "No shared_ptr owns this object"; return weak_this_.lock(); } @@ -456,7 +456,8 @@ class enable_shared_from_this { template void shared_ptr::MaybeSetupWeakThis(enable_shared_from_this* ptr) { if (ptr) { - CHECK(ptr->weak_this_.expired()) << "Object already owned by a shared_ptr"; + GOOGLE_CHECK(ptr->weak_this_.expired()) + << "Object already owned by a shared_ptr"; ptr->weak_this_ = *this; } } -- cgit v1.2.3