Bug 924749: Make loop variable signed-ness match the type they're compared against, to fix signed/unsigned warnings in PathCairo.cpp. r=Bas
authorDaniel Holbert <dholbert@cs.stanford.edu>
Fri, 11 Oct 2013 08:55:03 -0700
changeset 164335 b4c3caf8f741c9465af765276d79faccf051fd85
parent 164334 0f1efa209f534408d2188a55573e269c3a391dce
child 164336 6114164c3d1b8110074aa66de78660e9c0a4a5ee
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas
bugs924749
milestone27.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 924749: Make loop variable signed-ness match the type they're compared against, to fix signed/unsigned warnings in PathCairo.cpp. r=Bas
gfx/2d/PathCairo.cpp
--- a/gfx/2d/PathCairo.cpp
+++ b/gfx/2d/PathCairo.cpp
@@ -264,31 +264,31 @@ PathCairo::SetPathOnContext(cairo_t *aCo
     cairo_append_path(aContext, &path);
   }
 }
 
 void
 PathCairo::AppendPathToBuilder(PathBuilderCairo *aBuilder, const Matrix *aTransform) const
 {
   if (aTransform) {
-    int i = 0;
+    size_t i = 0;
     while (i < mPathData.size()) {
       uint32_t pointCount = mPathData[i].header.length - 1;
       aBuilder->mPathData.push_back(mPathData[i]);
       i++;
-      for (int c = 0; c < pointCount; c++) {
+      for (uint32_t c = 0; c < pointCount; c++) {
         cairo_path_data_t data;
         Point newPoint = *aTransform * Point(mPathData[i].point.x, mPathData[i].point.y);
         data.point.x = newPoint.x;
         data.point.y = newPoint.y;
         aBuilder->mPathData.push_back(data);
         i++;
       }
     }
   } else {
-    for (int i = 0; i < mPathData.size(); i++) {
+    for (size_t i = 0; i < mPathData.size(); i++) {
       aBuilder->mPathData.push_back(mPathData[i]);
     }
   }
 }
 
 }
 }