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

Unified Diff: compiled/debug.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/StringMap.h ('k') | compiled/intrusive_ptr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/debug.h
===================================================================
--- a/compiled/debug.h
+++ b/compiled/debug.h
@@ -14,20 +14,16 @@
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "library.h"
-#if defined(assert)
-#undef assert
-#endif
-
class String;
struct console_type
{
static void log(const String& str)
{
LogString(str);
}
@@ -46,23 +42,23 @@
{
LogError(str);
}
};
static console_type console;
#if defined(DEBUG)
-inline void assert(bool condition, const String& str)
+inline void assert2(bool condition, const String& str)
{
if (!condition)
console.error(str);
}
#else
-#define assert(condition, str)
+#define assert2(condition, str)
#endif
#if defined(__EMSCRIPTEN_TRACING__)
#include <emscripten/trace.h>
inline void init_tracing()
{
emscripten_trace_configure("http://127.0.0.1:5000/", "MyApplication");
« no previous file with comments | « compiled/StringMap.h ('k') | compiled/intrusive_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld