Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@5410 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/bench/RTreeBench.cpp b/bench/RTreeBench.cpp
index ece81c0..759037e 100644
--- a/bench/RTreeBench.cpp
+++ b/bench/RTreeBench.cpp
@@ -25,10 +25,10 @@
 public:
     BBoxBuildBench(void* param, const char* name, MakeRectProc proc, bool bulkLoad,
                     SkBBoxHierarchy* tree)
-        : INHERITED(param) 
+        : INHERITED(param)
         , fTree(tree)
         , fProc(proc)
-        , fName(name) 
+        , fName(name)
         , fBulkLoad(bulkLoad) { }
 protected:
     virtual const char* onGetName() {
@@ -70,9 +70,9 @@
         kFull_QueryType   // queries that cover everything
     };
 
-    BBoxQueryBench(void* param, const char* name, MakeRectProc proc, bool bulkLoad, 
+    BBoxQueryBench(void* param, const char* name, MakeRectProc proc, bool bulkLoad,
                     QueryType q, SkBBoxHierarchy* tree)
-        : INHERITED(param) 
+        : INHERITED(param)
         , fTree(tree)
         , fProc(proc)
         , fName(name)
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 81974c0..6cc9443 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -763,7 +763,7 @@
      * addAndLockStencilBuffer. When a SB's RT-attachment count
      * reaches zero the SB unlocks itself using unlockStencilBuffer and is
      * eligible for purging. findAndLockStencilBuffer is called to check the
-     * cache for a SB that matches an RT's criteria. 
+     * cache for a SB that matches an RT's criteria.
      */
     void addAndLockStencilBuffer(GrStencilBuffer* sb);
     void unlockStencilBuffer(GrStencilBuffer* sb);
diff --git a/src/core/SkRTree.cpp b/src/core/SkRTree.cpp
index 8aff078..18a3f61 100644
--- a/src/core/SkRTree.cpp
+++ b/src/core/SkRTree.cpp
@@ -12,7 +12,7 @@
 static inline uint32_t get_area(const SkIRect& rect);
 static inline uint32_t get_overlap(const SkIRect& rect1, const SkIRect& rect2);
 static inline uint32_t get_margin(const SkIRect& rect);
-static inline uint32_t get_overlap_increase(const SkIRect& rect1, const SkIRect& rect2, 
+static inline uint32_t get_overlap_increase(const SkIRect& rect1, const SkIRect& rect2,
                                             SkIRect expandBy);
 static inline uint32_t get_area_increase(const SkIRect& rect1, SkIRect rect2);
 static inline void join_no_empty_check(const SkIRect& joinWith, SkIRect* out);
@@ -33,7 +33,7 @@
     , fNodeSize(sizeof(Node) + sizeof(Branch) * maxChildren)
     , fCount(0)
     , fNodes(fNodeSize * 256) {
-    SkASSERT(minChildren < maxChildren && minChildren > 0 && maxChildren < 
+    SkASSERT(minChildren < maxChildren && minChildren > 0 && maxChildren <
              static_cast<int>(SK_MaxU16));
     SkASSERT((maxChildren + 1) / 2 >= minChildren);
     this->validate();
@@ -45,7 +45,7 @@
 
 void SkRTree::insert(void* data, const SkIRect& bounds, bool defer) {
     this->validate();
-    if (bounds.isEmpty()) { 
+    if (bounds.isEmpty()) {
         SkASSERT(false);
         return;
     }
@@ -211,7 +211,7 @@
             }
             // break ties with lowest area increase
             if (overlap < minOverlapIncrease || (overlap == minOverlapIncrease &&
-                static_cast<int32_t>(get_area_increase(branch->fBounds, subtreeBounds)) < 
+                static_cast<int32_t>(get_area_increase(branch->fBounds, subtreeBounds)) <
                 minAreaIncrease)) {
                 minOverlapIncrease = overlap;
                 minAreaIncrease = get_area_increase(branch->fBounds, subtreeBounds);
@@ -267,7 +267,7 @@
                 SkIRect r2 = children[fMinChildren + k - 1].fBounds;
                 for (int32_t l = 1; l < fMinChildren - 1 + k; ++l) {
                     join_no_empty_check(children[l].fBounds, &r1);
-                } 
+                }
                 for (int32_t l = fMinChildren + k; l < fMaxChildren + 1; ++l) {
                     join_no_empty_check(children[l].fBounds, &r2);
                 }
@@ -298,7 +298,7 @@
     if (!(axis == 1 && sortSide == 1)) {
         SkQSort(sorts[axis][sortSide], children, children + fMaxChildren, &RectLessThan);
     }
-    
+
     return fMinChildren - 1 + k;
 }
 
@@ -323,7 +323,7 @@
     } else {
         // First we sort the whole list by y coordinates
         SkQSort<int, Branch>(level, branches->begin(), branches->end() - 1, &RectLessY);
-        
+
         int numBranches = branches->count() / fMaxChildren;
         int remainder = branches->count() % fMaxChildren;
         int newBranches = 0;
@@ -344,14 +344,14 @@
 
         for (int i = 0; i < numStrips; ++i) {
             int begin = currentBranch;
-            int end = currentBranch + numStrips * fMaxChildren - SkMin32(remainder, 
+            int end = currentBranch + numStrips * fMaxChildren - SkMin32(remainder,
                       (fMaxChildren - fMinChildren) * numStrips);
             if (end > branches->count()) {
                 end = branches->count();
             }
 
             // Now we sort horizontal strips of rectangles by their x coords
-            SkQSort<int, Branch>(level, branches->begin() + begin, branches->begin() + end - 1, 
+            SkQSort<int, Branch>(level, branches->begin() + begin, branches->begin() + end - 1,
                                  &RectLessX);
 
             for (int j = 0; j < numStrips && currentBranch < branches->count(); ++j) {
@@ -447,7 +447,7 @@
     return 2 * (rect.width() + rect.height());
 }
 
-static inline uint32_t get_overlap_increase(const SkIRect& rect1, const SkIRect& rect2, 
+static inline uint32_t get_overlap_increase(const SkIRect& rect1, const SkIRect& rect2,
                                           SkIRect expandBy) {
     join_no_empty_check(rect1, &expandBy);
     return get_overlap(expandBy, rect2) - get_overlap(rect1, rect2);
diff --git a/src/core/SkRTree.h b/src/core/SkRTree.h
index c58fabf..756798b 100644
--- a/src/core/SkRTree.h
+++ b/src/core/SkRTree.h
@@ -16,13 +16,13 @@
 
 /**
  * An R-Tree implementation. In short, it is a balanced n-ary tree containing a hierarchy of
- * bounding rectangles. 
- * 
- * Much like a B-Tree it maintains balance by enforcing minimum and maximum child counts, and 
+ * bounding rectangles.
+ *
+ * Much like a B-Tree it maintains balance by enforcing minimum and maximum child counts, and
  * splitting nodes when they become overfull. Unlike B-trees, however, we're using spatial data; so
- * there isn't a canonical ordering to use when choosing insertion locations and splitting 
+ * there isn't a canonical ordering to use when choosing insertion locations and splitting
  * distributions. A variety of heuristics have been proposed for these problems; here, we're using
- * something resembling an R*-tree, which attempts to minimize area and overlap during insertion, 
+ * something resembling an R*-tree, which attempts to minimize area and overlap during insertion,
  * and aims to minimize a combination of margin, overlap, and area when splitting.
  *
  * One detail that is thus far unimplemented that may improve tree quality is attempting to remove
@@ -33,7 +33,7 @@
  *
  * For more details see:
  *
- *  Beckmann, N.; Kriegel, H. P.; Schneider, R.; Seeger, B. (1990). "The R*-tree: 
+ *  Beckmann, N.; Kriegel, H. P.; Schneider, R.; Seeger, B. (1990). "The R*-tree:
  *      an efficient and robust access method for points and rectangles"
  *
  * It also supports bulk-loading from a batch of bounds and values; if you don't require the tree
@@ -97,7 +97,7 @@
         } fChild;
         SkIRect fBounds;
     };
-    
+
     /**
      * A node in the tree, has between fMinChildren and fMaxChildren (the root is a special case)
      */
@@ -143,8 +143,8 @@
     void search(Node* root, const SkIRect query, SkTDArray<void*>* results) const;
 
     /**
-     * This performs a bottom-up bulk load using the STR (sort-tile-recursive) algorithm, this 
-     * seems to generally produce better, more consistent trees at significantly lower cost than 
+     * This performs a bottom-up bulk load using the STR (sort-tile-recursive) algorithm, this
+     * seems to generally produce better, more consistent trees at significantly lower cost than
      * repeated insertions.
      *
      * This consumes the input array.
diff --git a/src/gpu/GrResourceCache.cpp b/src/gpu/GrResourceCache.cpp
index 4b262d4..b567ecb 100644
--- a/src/gpu/GrResourceCache.cpp
+++ b/src/gpu/GrResourceCache.cpp
@@ -17,7 +17,7 @@
 
     // we assume ownership of the resource, and will unref it when we die
     GrAssert(resource);
-    resource->ref();    
+    resource->ref();
 }
 
 GrResourceEntry::~GrResourceEntry() {
diff --git a/tests/RTreeTest.cpp b/tests/RTreeTest.cpp
index 587222c..61e6b67 100644
--- a/tests/RTreeTest.cpp
+++ b/tests/RTreeTest.cpp
@@ -42,7 +42,7 @@
     }
 }
 
-static bool verify_query(SkIRect query, DataRect rects[], 
+static bool verify_query(SkIRect query, DataRect rects[],
                          SkTDArray<void*>& found) {
     SkTDArray<void*> expected;
     // manually intersect with every rectangle
@@ -52,23 +52,23 @@
         }
     }
 
-    if (expected.count() != found.count()) { 
-        return false; 
-    } 
-    
+    if (expected.count() != found.count()) {
+        return false;
+    }
+
     if (0 == expected.count()) {
         return true;
     }
 
     // Just cast to long since sorting by the value of the void*'s was being problematic...
-    SkTQSort(reinterpret_cast<long*>(expected.begin()), 
+    SkTQSort(reinterpret_cast<long*>(expected.begin()),
              reinterpret_cast<long*>(expected.end() - 1));
-    SkTQSort(reinterpret_cast<long*>(found.begin()), 
+    SkTQSort(reinterpret_cast<long*>(found.begin()),
              reinterpret_cast<long*>(found.end() - 1));
     return found == expected;
 }
 
-static void runQueries(skiatest::Reporter* reporter, SkRandom& rand, DataRect rects[], 
+static void runQueries(skiatest::Reporter* reporter, SkRandom& rand, DataRect rects[],
                        SkRTree& tree) {
     for (int i = 0; i < NUM_QUERIES; ++i) {
         SkTDArray<void*> hits;
@@ -89,7 +89,7 @@
 
     int tmp = NUM_RECTS;
     while (tmp > 0) {
-        tmp -= static_cast<int>(pow(static_cast<double>(MAX_CHILDREN), 
+        tmp -= static_cast<int>(pow(static_cast<double>(MAX_CHILDREN),
                                 static_cast<double>(expectedDepthMin + 1)));
         ++expectedDepthMin;
     }