Bug 1311277 Part 1 - Convert |other| argument to Mozilla coding style. draft
authorTing-Yu Lin <tlin@mozilla.com>
Wed, 19 Oct 2016 13:24:23 +0800
changeset 427422 201a5a770addea749b4dfab105676640e7e81496
parent 427316 52f527bd1524363e43e47e65cf2c9613b6c23ede
child 427423 14bdda15eb450cd1466b4c52decb6fd6fb89db38
child 427451 7e24ea6ea7d11952a007df82bae16545eb207e84
child 427904 fd317ce1e4073965ec8afba1366d66a7675a7203
push id33000
push userbmo:tlin@mozilla.com
push dateThu, 20 Oct 2016 09:04:41 +0000
bugs1311277
milestone52.0a1
Bug 1311277 Part 1 - Convert |other| argument to Mozilla coding style. MozReview-Commit-ID: JcEloAe5dlA
mfbt/LinkedList.h
--- a/mfbt/LinkedList.h
+++ b/mfbt/LinkedList.h
@@ -120,44 +120,44 @@ private:
 
 public:
   LinkedListElement()
     : mNext(this),
       mPrev(this),
       mIsSentinel(false)
   { }
 
-  LinkedListElement(LinkedListElement<T>&& other)
-    : mIsSentinel(other.mIsSentinel)
+  LinkedListElement(LinkedListElement<T>&& aOther)
+    : mIsSentinel(aOther.mIsSentinel)
   {
-    if (!other.isInList()) {
+    if (!aOther.isInList()) {
       mNext = this;
       mPrev = this;
       return;
     }
 
-    MOZ_ASSERT(other.mNext->mPrev == &other);
-    MOZ_ASSERT(other.mPrev->mNext == &other);
+    MOZ_ASSERT(aOther.mNext->mPrev == &aOther);
+    MOZ_ASSERT(aOther.mPrev->mNext == &aOther);
 
     /*
-     * Initialize |this| with |other|'s mPrev/mNext pointers, and adjust those
+     * Initialize |this| with |aOther|'s mPrev/mNext pointers, and adjust those
      * element to point to this one.
      */
-    mNext = other.mNext;
-    mPrev = other.mPrev;
+    mNext = aOther.mNext;
+    mPrev = aOther.mPrev;
 
     mNext->mPrev = this;
     mPrev->mNext = this;
 
     /*
-     * Adjust |other| so it doesn't think it's in a list.  This makes it
+     * Adjust |aOther| so it doesn't think it's in a list.  This makes it
      * safely destructable.
      */
-    other.mNext = &other;
-    other.mPrev = &other;
+    aOther.mNext = &aOther;
+    aOther.mPrev = &aOther;
   }
 
   ~LinkedListElement()
   {
     if (!mIsSentinel && isInList()) {
       remove();
     }
   }