summaryrefslogtreecommitdiffstats
path: root/base/linked_ptr.h
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-26 23:08:02 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-26 23:08:02 +0000
commit2fdc86af6441d62cf6f3af049ac4cab1984d5323 (patch)
tree4a548a889f1c261676bdd4b6ccbca4255cea1c5e /base/linked_ptr.h
parent7e7a62b46abc05baaa5e969fd64cff485857c1b6 (diff)
downloadchromium_src-2fdc86af6441d62cf6f3af049ac4cab1984d5323.zip
chromium_src-2fdc86af6441d62cf6f3af049ac4cab1984d5323.tar.gz
chromium_src-2fdc86af6441d62cf6f3af049ac4cab1984d5323.tar.bz2
Style cleanup in preparation for auto-linting base/.
BUG=none TEST=none Review URL: http://codereview.chromium.org/552004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37164 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/linked_ptr.h')
-rw-r--r--base/linked_ptr.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/base/linked_ptr.h b/base/linked_ptr.h
index 3f2bdb9..d9e81b3 100644
--- a/base/linked_ptr.h
+++ b/base/linked_ptr.h
@@ -85,7 +85,11 @@ class linked_ptr {
// Copy an existing linked_ptr<>, adding ourselves to the list of references.
template <typename U> linked_ptr(linked_ptr<U> const& ptr) { copy(&ptr); }
- linked_ptr(linked_ptr const& ptr) { DCHECK_NE(&ptr, this); copy(&ptr); }
+
+ linked_ptr(linked_ptr const& ptr) {
+ DCHECK_NE(&ptr, this);
+ copy(&ptr);
+ }
// Assignment releases the old value and acquires the new.
template <typename U> linked_ptr& operator=(linked_ptr<U> const& ptr) {
@@ -103,7 +107,10 @@ class linked_ptr {
}
// Smart pointer members.
- void reset(T* ptr = NULL) { depart(); capture(ptr); }
+ void reset(T* ptr = NULL) {
+ depart();
+ capture(ptr);
+ }
T* get() const { return value_; }
T* operator->() const { return value_; }
T& operator*() const { return *value_; }