Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Side by Side Diff: third_party/WebKit/Source/wtf/ConditionalDestructor.h

Issue 1629693002: Add missing closing namespace comments to wtf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: PR26274 Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ConditionalDestructor_h 5 #ifndef ConditionalDestructor_h
6 #define ConditionalDestructor_h 6 #define ConditionalDestructor_h
7 7
8 namespace WTF { 8 namespace WTF {
9 9
10 // ConditionalDestructor defines the destructor of the derived object. 10 // ConditionalDestructor defines the destructor of the derived object.
11 // This base is used in order to completely avoid creating a destructor 11 // This base is used in order to completely avoid creating a destructor
12 // for an object that does not need to be destructed. By doing so, 12 // for an object that does not need to be destructed. By doing so,
13 // the clang compiler will have correct information about whether or not 13 // the clang compiler will have correct information about whether or not
14 // the object has a trivial destructor. 14 // the object has a trivial destructor.
15 // Note: the derived object MUST release all its recources at the finalize() 15 // Note: the derived object MUST release all its recources at the finalize()
16 // method. 16 // method.
17 template<typename Derived, bool noDestructor> 17 template<typename Derived, bool noDestructor>
18 class ConditionalDestructor { 18 class ConditionalDestructor {
19 public: 19 public:
20 ~ConditionalDestructor() { static_cast<Derived*>(this)->finalize(); } 20 ~ConditionalDestructor() { static_cast<Derived*>(this)->finalize(); }
21 }; 21 };
22 22
23 template<typename Derived> 23 template<typename Derived>
24 class ConditionalDestructor<Derived, true> { }; 24 class ConditionalDestructor<Derived, true> { };
25 25
26 } 26 } // namespace WTF
27 27
28 #endif // ConditionalDestructor_h 28 #endif // ConditionalDestructor_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/CheckedArithmetic.h ('k') | third_party/WebKit/Source/wtf/CryptographicallyRandomNumber.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698