Bug 944176: In mozilla::Scoped, don't gratuitously repeat template arguments within the class template itself. r=waldo
authorJim Blandy <jimb@mozilla.com>
Thu, 27 Mar 2014 09:52:43 -0700
changeset 175661 a673af0b3f228fab7c8053e14a3ffa57189314cb
parent 175660 3a8f7aabfeb683fb67902c2e323f31ba0298387a
child 175662 012fea76225f8aae6806b1ef3aa2353041a0382c
push id26496
push userkwierso@gmail.com
push dateFri, 28 Mar 2014 02:28:34 +0000
treeherdermozilla-central@3c09159e01da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswaldo
bugs944176
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 944176: In mozilla::Scoped, don't gratuitously repeat template arguments within the class template itself. r=waldo
mfbt/Scoped.h
--- a/mfbt/Scoped.h
+++ b/mfbt/Scoped.h
@@ -132,28 +132,28 @@ class Scoped
     /*
      * Replace the resource with another resource.
      *
      * Calling |operator=| has the side-effect of triggering clean-up. If you do
      * not want to trigger clean-up, you should first invoke |forget|.
      *
      * @return this
      */
-    Scoped<Traits>& operator=(const Resource& other) {
+    Scoped& operator=(const Resource& other) {
       return reset(other);
     }
-    Scoped<Traits>& reset(const Resource& other) {
+    Scoped& reset(const Resource& other) {
       Traits::release(value);
       value = other;
       return *this;
     }
 
   private:
-    explicit Scoped(const Scoped<Traits>& value) MOZ_DELETE;
-    Scoped<Traits>& operator=(const Scoped<Traits>& value) MOZ_DELETE;
+    explicit Scoped(const Scoped& value) MOZ_DELETE;
+    Scoped& operator=(const Scoped& value) MOZ_DELETE;
 
   private:
     Resource value;
     MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
 };
 
 /*
  * SCOPED_TEMPLATE defines a templated class derived from Scoped