From f777dad47428bc87b45c3d6875bed26335c9c100 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 11 Oct 2016 21:32:34 -0400 Subject: [PATCH] Move the message for internal::RaiseUseAfterFree to the implementation. --- zcpointer.cc | 4 ++-- zcpointer.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/zcpointer.cc b/zcpointer.cc index 4f4afdf..db39cf4 100644 --- a/zcpointer.cc +++ b/zcpointer.cc @@ -19,8 +19,8 @@ namespace zc { namespace internal { -void RaiseUseAfterFree(const char* error) { - throw zc::UseAfterFreeError(error); +void RaiseUseAfterFree() { + throw zc::UseAfterFreeError("attempt to access deleted pointer"); } } // namespace internal diff --git a/zcpointer.h b/zcpointer.h index 74a547d..d77bb63 100644 --- a/zcpointer.h +++ b/zcpointer.h @@ -85,7 +85,7 @@ class OwnedPtrDeleter { OwnershipBehavior behavior_; }; -void RaiseUseAfterFree(const char* error) __attribute__((noreturn)); +void RaiseUseAfterFree() __attribute__((noreturn)); } // namespace internal @@ -171,7 +171,7 @@ class ref { private: void CheckDeleted() const { if (IsDeleted()) { - internal::RaiseUseAfterFree("attempt to access deleted pointer"); + internal::RaiseUseAfterFree(); } } -- 2.43.5