summaryrefslogtreecommitdiffstats
path: root/base/scoped_nsobject.h
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-16 18:37:13 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-16 18:37:13 +0000
commit59d1aacf35db435aa3c5ec0c17a582392627e7a9 (patch)
tree525512e161de0460b6b354edc87b050e354750c6 /base/scoped_nsobject.h
parentcc2c217e71a89436aa017f7927dda21d3de71c1d (diff)
downloadchromium_src-59d1aacf35db435aa3c5ec0c17a582392627e7a9.zip
chromium_src-59d1aacf35db435aa3c5ec0c17a582392627e7a9.tar.gz
chromium_src-59d1aacf35db435aa3c5ec0c17a582392627e7a9.tar.bz2
Revert 49984 - patch from issue 2762014
TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/2835007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50000 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/scoped_nsobject.h')
-rw-r--r--base/scoped_nsobject.h35
1 files changed, 14 insertions, 21 deletions
diff --git a/base/scoped_nsobject.h b/base/scoped_nsobject.h
index 7e544c9..bde2753 100644
--- a/base/scoped_nsobject.h
+++ b/base/scoped_nsobject.h
@@ -48,8 +48,13 @@ class scoped_nsobject {
object_ = object;
}
- bool operator==(NST* that) const { return object_ == that; }
- bool operator!=(NST* that) const { return object_ != that; }
+ bool operator==(NST* that) const {
+ return object_ == that;
+ }
+
+ bool operator!=(NST* that) const {
+ return object_ != that;
+ }
operator NST*() const {
return object_;
@@ -80,23 +85,6 @@ class scoped_nsobject {
DISALLOW_COPY_AND_ASSIGN(scoped_nsobject);
};
-// Free functions
-template <class C>
-void swap(scoped_nsobject<C>& p1, scoped_nsobject<C>& p2) {
- p1.swap(p2);
-}
-
-template <class C>
-bool operator==(C* p1, const scoped_nsobject<C>& p2) {
- return p1 == p2.get();
-}
-
-template <class C>
-bool operator!=(C* p1, const scoped_nsobject<C>& p2) {
- return p1 != p2.get();
-}
-
-
// Specialization to make scoped_nsobject<id> work.
template<>
class scoped_nsobject<id> {
@@ -121,8 +109,13 @@ class scoped_nsobject<id> {
object_ = object;
}
- bool operator==(id that) const { return object_ == that; }
- bool operator!=(id that) const { return object_ != that; }
+ bool operator==(id that) const {
+ return object_ == that;
+ }
+
+ bool operator!=(id that) const {
+ return object_ != that;
+ }
operator id() const {
return object_;