diff --git a/base/src/refbase.cpp b/base/src/refbase.cpp index fd15b8206ffc2ed0e992b70e75e480170600a4a9..d01f08286d25f8d28c6d65bfdd018372071ad578 100755 --- a/base/src/refbase.cpp +++ b/base/src/refbase.cpp @@ -103,7 +103,7 @@ RefCounter::~RefCounter() { } -int RefCounter::IncStrongRefCount(const void* /* objectId */) +int RefCounter::IncStrongRefCount(const void*) { int curCount = atomicStrong_.load(std::memory_order_relaxed); @@ -117,7 +117,7 @@ int RefCounter::IncStrongRefCount(const void* /* objectId */) return curCount; } -int RefCounter::DecStrongRefCount(const void* /* objectId */) +int RefCounter::DecStrongRefCount(const void*) { int curCount = GetStrongRefCount(); if (curCount == INITIAL_PRIMARY_VALUE) { @@ -136,12 +136,12 @@ int RefCounter::GetStrongRefCount() return atomicStrong_.load(std::memory_order_relaxed); } -int RefCounter::IncWeakRefCount(const void* /* objectId */) +int RefCounter::IncWeakRefCount(const void*) { return atomicWeak_.fetch_add(1, std::memory_order_relaxed); } -int RefCounter::DecWeakRefCount(const void* /* objectId */) +int RefCounter::DecWeakRefCount(const void*) { int curCount = GetWeakRefCount(); if (curCount > 0) { @@ -237,7 +237,7 @@ RefBase::RefBase() : refs_(new RefCounter()) refs_->SetCallback(std::bind(&RefBase::RefPtrCallback, this)); } -RefBase::RefBase(const RefBase & /* other */) +RefBase::RefBase(const RefBase &) { refs_ = new RefCounter(); if (refs_ != nullptr) { @@ -257,7 +257,7 @@ void RefBase::RefPtrCallback() * RISK: If there is a reference count on the left of the equal sign, * it may cause a reference count exception */ -RefBase &RefBase::operator=(const RefBase & /* other */) +RefBase &RefBase::operator=(const RefBase &) { if (refs_ != nullptr) { refs_->RemoveCallback(); @@ -426,16 +426,16 @@ bool RefBase::IsExtendLifeTimeSet() return refs_->IsLifeTimeExtended(); } -void RefBase::OnFirstStrongRef(const void* /* objectId */) +void RefBase::OnFirstStrongRef(const void*) {} -void RefBase::OnLastStrongRef(const void* /* objectId */) +void RefBase::OnLastStrongRef(const void*) {} -void RefBase::OnLastWeakRef(const void* /* objectId */) +void RefBase::OnLastWeakRef(const void*) {} -bool RefBase::OnAttemptPromoted(const void* /* objectId */) +bool RefBase::OnAttemptPromoted(const void*) { return true; }