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

Side by Side Diff: third_party/WebKit/Source/platform/PODRedBlackTree.h

Issue 2063773002: Reland: WTF: Implement explicit RefPtr::operator bool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // isInitialized will return false. 151 // isInitialized will return false.
152 void clear() 152 void clear()
153 { 153 {
154 markFree(m_root); 154 markFree(m_root);
155 m_arena = nullptr; 155 m_arena = nullptr;
156 m_root = 0; 156 m_root = 0;
157 } 157 }
158 158
159 bool isInitialized() const 159 bool isInitialized() const
160 { 160 {
161 return m_arena; 161 return m_arena.get();
162 } 162 }
163 163
164 void initIfNeeded() 164 void initIfNeeded()
165 { 165 {
166 if (!m_arena) 166 if (!m_arena)
167 m_arena = PODFreeListArena<Node>::create(); 167 m_arena = PODFreeListArena<Node>::create();
168 } 168 }
169 169
170 void initIfNeeded(PODFreeListArena<Node>* arena) 170 void initIfNeeded(PODFreeListArena<Node>* arena)
171 { 171 {
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 Node* m_root; 823 Node* m_root;
824 bool m_needsFullOrderingComparisons; 824 bool m_needsFullOrderingComparisons;
825 #ifndef NDEBUG 825 #ifndef NDEBUG
826 bool m_verboseDebugging; 826 bool m_verboseDebugging;
827 #endif 827 #endif
828 }; 828 };
829 829
830 } // namespace blink 830 } // namespace blink
831 831
832 #endif // PODRedBlackTree_h 832 #endif // PODRedBlackTree_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698