Bug 1356843 - Fix -Wcomma warnings in gfx/layers/Layers.cpp. r=mchang draft
authorChris Peterson <cpeterson@mozilla.com>
Mon, 27 Mar 2017 21:29:42 -0700
changeset 563948 829f756d04a3f3e06669e3700e4e373ca9cf5adc
parent 563947 ed9a0bf53f232a887d40918d2ff7d9ca63a45455
child 563949 226579518bb9989b0812ef217499c7bc69a84806
push id54485
push usercpeterson@mozilla.com
push dateTue, 18 Apr 2017 05:57:33 +0000
reviewersmchang
bugs1356843
milestone55.0a1
Bug 1356843 - Fix -Wcomma warnings in gfx/layers/Layers.cpp. r=mchang clang's -Wcomma warning warns about suspicious use of the comma operator such as between two statements. gfx/layers/Layers.cpp:1944:33 [-Wcomma] possible misuse of comma operator here gfx/layers/Layers.cpp:1945:33 [-Wcomma] possible misuse of comma operator here gfx/layers/Layers.cpp:1946:33 [-Wcomma] possible misuse of comma operator here gfx/layers/Layers.cpp:1949:37 [-Wcomma] possible misuse of comma operator here gfx/layers/Layers.cpp:1950:37 [-Wcomma] possible misuse of comma operator here gfx/layers/Layers.cpp:1951:37 [-Wcomma] possible misuse of comma operator here gfx/layers/Layers.cpp:1952:37 [-Wcomma] possible misuse of comma operator here gfx/layers/Layers.cpp:1953:37 [-Wcomma] possible misuse of comma operator here gfx/layers/Layers.cpp:1954:37 [-Wcomma] possible misuse of comma operator here gfx/layers/Layers.cpp:1955:37 [-Wcomma] possible misuse of comma operator here gfx/layers/Layers.cpp:1956:37 [-Wcomma] possible misuse of comma operator here MozReview-Commit-ID: 9lMJZrPRtTV
gfx/layers/Layers.cpp
--- a/gfx/layers/Layers.cpp
+++ b/gfx/layers/Layers.cpp
@@ -1920,29 +1920,29 @@ Layer::PrintInfo(std::stringstream& aStr
 static void
 DumpTransform(layerscope::LayersPacket::Layer::Matrix* aLayerMatrix, const Matrix4x4& aMatrix)
 {
   aLayerMatrix->set_is2d(aMatrix.Is2D());
   if (aMatrix.Is2D()) {
     Matrix m = aMatrix.As2D();
     aLayerMatrix->set_isid(m.IsIdentity());
     if (!m.IsIdentity()) {
-      aLayerMatrix->add_m(m._11), aLayerMatrix->add_m(m._12);
-      aLayerMatrix->add_m(m._21), aLayerMatrix->add_m(m._22);
-      aLayerMatrix->add_m(m._31), aLayerMatrix->add_m(m._32);
+      aLayerMatrix->add_m(m._11); aLayerMatrix->add_m(m._12);
+      aLayerMatrix->add_m(m._21); aLayerMatrix->add_m(m._22);
+      aLayerMatrix->add_m(m._31); aLayerMatrix->add_m(m._32);
     }
   } else {
-    aLayerMatrix->add_m(aMatrix._11), aLayerMatrix->add_m(aMatrix._12);
-    aLayerMatrix->add_m(aMatrix._13), aLayerMatrix->add_m(aMatrix._14);
-    aLayerMatrix->add_m(aMatrix._21), aLayerMatrix->add_m(aMatrix._22);
-    aLayerMatrix->add_m(aMatrix._23), aLayerMatrix->add_m(aMatrix._24);
-    aLayerMatrix->add_m(aMatrix._31), aLayerMatrix->add_m(aMatrix._32);
-    aLayerMatrix->add_m(aMatrix._33), aLayerMatrix->add_m(aMatrix._34);
-    aLayerMatrix->add_m(aMatrix._41), aLayerMatrix->add_m(aMatrix._42);
-    aLayerMatrix->add_m(aMatrix._43), aLayerMatrix->add_m(aMatrix._44);
+    aLayerMatrix->add_m(aMatrix._11); aLayerMatrix->add_m(aMatrix._12);
+    aLayerMatrix->add_m(aMatrix._13); aLayerMatrix->add_m(aMatrix._14);
+    aLayerMatrix->add_m(aMatrix._21); aLayerMatrix->add_m(aMatrix._22);
+    aLayerMatrix->add_m(aMatrix._23); aLayerMatrix->add_m(aMatrix._24);
+    aLayerMatrix->add_m(aMatrix._31); aLayerMatrix->add_m(aMatrix._32);
+    aLayerMatrix->add_m(aMatrix._33); aLayerMatrix->add_m(aMatrix._34);
+    aLayerMatrix->add_m(aMatrix._41); aLayerMatrix->add_m(aMatrix._42);
+    aLayerMatrix->add_m(aMatrix._43); aLayerMatrix->add_m(aMatrix._44);
   }
 }
 
 // The static helper function sets the IntRect into the packet
 template <typename T, typename Sub, typename Point, typename SizeT, typename MarginT>
 static void
 DumpRect(layerscope::LayersPacket::Layer::Rect* aLayerRect,
          const BaseRect<T, Sub, Point, SizeT, MarginT>& aRect)