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

Delta Between Two Patch Sets: compiled/debug.h

Issue 29613616: Issue 6064 - Put C++ code into a configurable namespace (Closed) Base URL: https://github.com/adblockplus/adblockpluscore.git
Left Patch Set: Created Nov. 21, 2017, 1:53 p.m.
Right Patch Set: rebase Created Feb. 6, 2018, 9:54 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 29 matching lines...) Expand all
40 LogPointer(ptr); 40 LogPointer(ptr);
41 } 41 }
42 42
43 static void error(const String& str) 43 static void error(const String& str)
44 { 44 {
45 LogError(str); 45 LogError(str);
46 } 46 }
47 }; 47 };
48 48
49 static console_type console; 49 static console_type console;
50 ABP_NS_END
50 51
51 #if defined(DEBUG) 52 #if defined(DEBUG)
52 inline void assert2(bool condition, const String& str) 53 inline void assert2(bool condition, const String& str)
53 { 54 {
54 if (!condition) 55 if (!condition)
55 console.error(str); 56 ABP_NS::console.error(str);
56 } 57 }
57 #else 58 #else
58 #define assert2(condition, str) 59 #define assert2(condition, str)
59 #endif 60 #endif
60
61 ABP_NS_END
62 61
63 #if defined(__EMSCRIPTEN_TRACING__) 62 #if defined(__EMSCRIPTEN_TRACING__)
64 #include <emscripten/trace.h> 63 #include <emscripten/trace.h>
65 64
66 ABP_NS_BEGIN 65 ABP_NS_BEGIN
67 66
68 inline void init_tracing() 67 inline void init_tracing()
69 { 68 {
70 emscripten_trace_configure("http://127.0.0.1:5000/", "MyApplication"); 69 emscripten_trace_configure("http://127.0.0.1:5000/", "MyApplication");
71 } 70 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 { 111 {
113 } 112 }
114 113
115 inline void exit_context() 114 inline void exit_context()
116 { 115 {
117 } 116 }
118 117
119 ABP_NS_END 118 ABP_NS_END
120 119
121 #endif // defined(__EMSCRIPTEN_TRACING__) 120 #endif // defined(__EMSCRIPTEN_TRACING__)
LEFTRIGHT

Powered by Google App Engine
This is Rietveld