Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: compiled/intrusive_ptr.h

Issue 29549903: Issue 5664 - assert now accept one parameter. (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Leave assert() alone now. Created Sept. 21, 2017, 12:48 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « compiled/debug.h ('k') | compiled/storage/FilterStorage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/intrusive_ptr.h
===================================================================
--- a/compiled/intrusive_ptr.h
+++ b/compiled/intrusive_ptr.h
@@ -35,30 +35,30 @@
public:
void AddRef()
{
mRefCount++;
}
void ReleaseRef()
{
- assert(mRefCount > 0, u"Unexpected zero or negative reference count"_str);
+ assert2(mRefCount > 0, u"Unexpected zero or negative reference count"_str);
if (--mRefCount == 0)
delete this;
}
protected:
ref_counted()
: mRefCount(1)
{
}
virtual ~ref_counted()
{
- assert(mRefCount == 0, u"Destroying a ref-counted object with a non-zero reference count"_str);
+ assert2(mRefCount == 0, u"Destroying a ref-counted object with a non-zero reference count"_str);
}
private:
int mRefCount;
};
template<typename T,
class = typename std::enable_if<std::is_base_of<ref_counted,T>::value>::type>
« no previous file with comments | « compiled/debug.h ('k') | compiled/storage/FilterStorage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld