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

Side by Side Diff: compiled/intrusive_ptr.h

Issue 29613616: Issue 6064 - Put C++ code into a configurable namespace (Closed) Base URL: https://github.com/adblockplus/adblockpluscore.git
Patch Set: Fix debug.h to be aligned with assert2 (define vs function) and get rid of a warning in generator.cpp Created Nov. 21, 2017, 2:53 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
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 10 matching lines...) Expand all
21 // 21 //
22 // Distributed under the Boost Software License, Version 1.0. (See 22 // Distributed under the Boost Software License, Version 1.0. (See
23 // accompanying file LICENSE_1_0.txt or copy at 23 // accompanying file LICENSE_1_0.txt or copy at
24 // http://www.boost.org/LICENSE_1_0.txt) 24 // http://www.boost.org/LICENSE_1_0.txt)
25 25
26 #pragma once 26 #pragma once
27 27
28 #include <algorithm> 28 #include <algorithm>
29 #include <type_traits> 29 #include <type_traits>
30 30
31 #include "base.h"
31 #include "debug.h" 32 #include "debug.h"
32 #include "String.h" 33 #include "String.h"
33 34
35 ABP_NS_BEGIN
36
34 class ref_counted 37 class ref_counted
35 { 38 {
36 public: 39 public:
37 void AddRef() 40 void AddRef()
38 { 41 {
39 mRefCount++; 42 mRefCount++;
40 } 43 }
41 44
42 void ReleaseRef() 45 void ReleaseRef()
43 { 46 {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 inline bool operator==(const T* a, const intrusive_ptr<U>& b) 214 inline bool operator==(const T* a, const intrusive_ptr<U>& b)
212 { 215 {
213 return a == b.get(); 216 return a == b.get();
214 } 217 }
215 218
216 template<typename T, typename U> 219 template<typename T, typename U>
217 inline bool operator!=(const T* a, intrusive_ptr<U> const& b) 220 inline bool operator!=(const T* a, intrusive_ptr<U> const& b)
218 { 221 {
219 return a != b.get(); 222 return a != b.get();
220 } 223 }
224
225 ABP_NS_END
OLDNEW

Powered by Google App Engine
This is Rietveld