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

Unified Diff: compiled/debug.h

Issue 29613616: Issue 6064 - Put C++ code into a configurable namespace (Closed) Base URL: https://github.com/adblockplus/adblockpluscore.git
Patch Set: rebase Created Feb. 6, 2018, 9:54 a.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/debug.h
diff --git a/compiled/debug.h b/compiled/debug.h
index f8cb40203618cbb25f548e22cd4ca167232746ad..b0447b3e436b9258890927bd43eb4aa85db2b110 100644
--- a/compiled/debug.h
+++ b/compiled/debug.h
@@ -17,8 +17,10 @@
#pragma once
+#include "base.h"
#include "library.h"
+ABP_NS_BEGIN
class String;
struct console_type
@@ -45,12 +47,13 @@ struct console_type
};
static console_type console;
+ABP_NS_END
#if defined(DEBUG)
inline void assert2(bool condition, const String& str)
{
if (!condition)
- console.error(str);
+ ABP_NS::console.error(str);
}
#else
#define assert2(condition, str)
@@ -59,6 +62,8 @@ inline void assert2(bool condition, const String& str)
#if defined(__EMSCRIPTEN_TRACING__)
#include <emscripten/trace.h>
+ABP_NS_BEGIN
+
inline void init_tracing()
{
emscripten_trace_configure("http://127.0.0.1:5000/", "MyApplication");
@@ -84,8 +89,12 @@ inline void exit_context()
emscripten_trace_exit_context();
}
+ABP_NS_END
+
#else // defined(__EMSCRIPTEN_TRACING__)
+ABP_NS_BEGIN
+
inline void init_tracing()
{
}
@@ -106,4 +115,6 @@ inline void exit_context()
{
}
+ABP_NS_END
+
#endif // defined(__EMSCRIPTEN_TRACING__)

Powered by Google App Engine
This is Rietveld