Bug 1245093: Explictly refer to |class ResponseCode| in global namespace, r=dhylands
authorThomas Zimmermann <tdz@users.sourceforge.net>
Wed, 03 Feb 2016 09:51:49 +0100
changeset 282850 dd132203a87e0f39ebac109bd3abbe5e2f4b3dac
parent 282820 94c27b21c934f0cc178e896587532d7cc0b4c60c
child 282851 d5f33d0117d4746ab9f05759e53f77841ca57fcf
push id29972
push usercbook@mozilla.com
push dateThu, 04 Feb 2016 11:02:19 +0000
treeherdermozilla-central@f53533d9eb77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdhylands
bugs1245093
milestone47.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 1245093: Explictly refer to |class ResponseCode| in global namespace, r=dhylands |VolumeResponseCallback::ResponseCode| shadows the type |ResponseCode|. This patch changes all affected places to refer explicitly to the |ResponseCode| type in the global namespace.
dom/system/gonk/VolumeCommand.h
--- a/dom/system/gonk/VolumeCommand.h
+++ b/dom/system/gonk/VolumeCommand.h
@@ -43,23 +43,23 @@ public:
   VolumeResponseCallback()
     : mResponseCode(0), mPending(false) {}
 
   bool Done() const
   {
     // Response codes from the 200, 400, and 500 series all indicated that
     // the command has completed.
 
-    return (mResponseCode >= ResponseCode::CommandOkay)
-        && (mResponseCode < ResponseCode::UnsolicitedInformational);
+    return (mResponseCode >= ::ResponseCode::CommandOkay)
+        && (mResponseCode < ::ResponseCode::UnsolicitedInformational);
   }
 
   bool WasSuccessful() const
   {
-    return mResponseCode == ResponseCode::CommandOkay;
+    return mResponseCode == ::ResponseCode::CommandOkay;
   }
 
   bool              IsPending() const     { return mPending; }
   int               ResponseCode() const  { return mResponseCode; }
   const nsCString  &ResponseStr() const   { return mResponseStr; }
 
 protected:
   virtual void ResponseReceived(const VolumeCommand* aCommand) = 0;
@@ -74,17 +74,17 @@ private:
     mResponseCode = aResponseCode;
 #if ANDROID_VERSION >= 17
     // There's a sequence number here that we don't care about
     // We expect it to be 0. See VolumeCommand::SetCmd
     mResponseStr = Substring(aResponseStr, 2);
 #else
     mResponseStr = aResponseStr;
 #endif
-    if (mResponseCode >= ResponseCode::CommandOkay) {
+    if (mResponseCode >= ::ResponseCode::CommandOkay) {
       // This is a final response.
       mPending = false;
     }
     ResponseReceived(aCommand);
   }
 
   void SetPending(bool aPending) { mPending = aPending; }