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

Side by Side Diff: public/platform/WebPrivatePtr.h

Issue 177243002: Remove unused WebPrivatePtr::operator=(std::nullptr_t). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 } 217 }
218 218
219 void reset() { storage().release(); } 219 void reset() { storage().release(); }
220 220
221 WebPrivatePtr<T>& operator=(const WebPrivatePtr<T>& other) 221 WebPrivatePtr<T>& operator=(const WebPrivatePtr<T>& other)
222 { 222 {
223 storage().assign(other.storage()); 223 storage().assign(other.storage());
224 return *this; 224 return *this;
225 } 225 }
226 226
227 WebPrivatePtr<T>& operator=(std::nullptr_t&)
228 {
229 reset();
230 return *this;
231 }
232
233 template<typename U> 227 template<typename U>
234 WebPrivatePtr<T>& operator=(const U& ptr) 228 WebPrivatePtr<T>& operator=(const U& ptr)
235 { 229 {
236 storage().assign(ptr); 230 storage().assign(ptr);
237 return *this; 231 return *this;
238 } 232 }
239 233
240 T* get() const { return storage().get(); } 234 T* get() const { return storage().get(); }
241 235
242 T* operator->() const 236 T* operator->() const
(...skipping 19 matching lines...) Expand all
262 // Disable the copy constructor; classes that contain a WebPrivatePtr 256 // Disable the copy constructor; classes that contain a WebPrivatePtr
263 // should implement their copy constructor using assign(). 257 // should implement their copy constructor using assign().
264 WebPrivatePtr(const WebPrivatePtr<T>&); 258 WebPrivatePtr(const WebPrivatePtr<T>&);
265 259
266 void* m_storage; 260 void* m_storage;
267 }; 261 };
268 262
269 } // namespace blink 263 } // namespace blink
270 264
271 #endif 265 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698