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: Used the wrong preprocessor operation for assert() Created Sept. 20, 2017, 2:15 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
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>
« compiled/debug.h ('K') | « compiled/debug.h ('k') | compiled/storage/FilterStorage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld