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
--- 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)