From 4c23ff5b8c353afecae35c9ab9910b864b3f449d Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 14 May 2014 11:55:20 +0800 Subject: [PATCH] trackRef and untrackRef are static function now. --- cocos/base/CCRef.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cocos/base/CCRef.cpp b/cocos/base/CCRef.cpp index 958d0b1072..9163a32409 100644 --- a/cocos/base/CCRef.cpp +++ b/cocos/base/CCRef.cpp @@ -35,8 +35,8 @@ THE SOFTWARE. NS_CC_BEGIN #if CC_USE_MEM_LEAK_DETECTION -void trackRef(Ref* ref); -void untrackRef(Ref* ref); +static void trackRef(Ref* ref); +static void untrackRef(Ref* ref); #endif Ref::Ref() @@ -168,15 +168,15 @@ void Ref::printLeaks() } } -void trackRef(Ref* ref) +static void trackRef(Ref* ref) { - CC_ASSERT(ref); + CCASSERT(ref, "Invalid parameter, ref should not be null!"); // Create memory allocation record. __refAllocationList.push_back(ref); } -void untrackRef(Ref* ref) +static void untrackRef(Ref* ref) { auto iter = std::find(__refAllocationList.begin(), __refAllocationList.end(), ref); if (iter == __refAllocationList.end())