From c1ad0226087e10b1f300b5a45e3d6fdb23b8d1b8 Mon Sep 17 00:00:00 2001 From: "skia.committer@gmail.com" Date: Wed, 19 Sep 2012 02:01:47 +0000 Subject: [PATCH] Sanitizing source files in Skia_Periodic_House_Keeping git-svn-id: http://skia.googlecode.com/svn/trunk@5594 2bbb7eff-a529-9590-31e7-b0007b416f81 --- .../Intersection/QuadraticImplicit.cpp | 2 +- experimental/Intersection/QuarticRoot.cpp | 2 +- experimental/Intersection/Simplify.cpp | 2 +- include/core/SkCanvas.h | 2 +- .../effects/SkMatrixConvolutionImageFilter.h | 2 +- src/gpu/GrTHashCache.h | 6 +-- tests/HashCacheTest.cpp | 42 +++++++++---------- 7 files changed, 29 insertions(+), 29 deletions(-) diff --git a/experimental/Intersection/QuadraticImplicit.cpp b/experimental/Intersection/QuadraticImplicit.cpp index be54ed688e..835b3bf71f 100644 --- a/experimental/Intersection/QuadraticImplicit.cpp +++ b/experimental/Intersection/QuadraticImplicit.cpp @@ -92,7 +92,7 @@ bool intersect2(const Quadratic& q1, const Quadratic& q2, Intersections& i) { int rootCount = findRoots(i2, q1, roots1); // OPTIMIZATION: could short circuit here if all roots are < 0 or > 1 #ifndef NDEBUG - int rootCount2 = + int rootCount2 = #endif findRoots(i1, q2, roots2); assert(rootCount == rootCount2); diff --git a/experimental/Intersection/QuarticRoot.cpp b/experimental/Intersection/QuarticRoot.cpp index 8e3664bef5..839c3b973b 100644 --- a/experimental/Intersection/QuarticRoot.cpp +++ b/experimental/Intersection/QuarticRoot.cpp @@ -150,7 +150,7 @@ static int cubicRootsX(double A, double B, double C, double D, double s[3]) { if (approximately_zero(R)) {/* one triple solution */ *roots++ = -adiv3; } else { /* one single and one double solution */ - + double u = cube_root(-R); *roots++ = 2 * u - adiv3; *roots++ = -u - adiv3; diff --git a/experimental/Intersection/Simplify.cpp b/experimental/Intersection/Simplify.cpp index 827c6178ff..2a65ad1219 100644 --- a/experimental/Intersection/Simplify.cpp +++ b/experimental/Intersection/Simplify.cpp @@ -564,7 +564,7 @@ public: #else SkASSERT(fVerb == SkPath::kQuad_Verb); // worry about cubics later SkASSERT(rh.fVerb == SkPath::kQuad_Verb); - // FIXME: until I can think of something better, project a ray from the + // FIXME: until I can think of something better, project a ray from the // end of the shorter tangent to midway between the end points // through both curves and use the resulting angle to sort // FIXME: some of this setup can be moved to set() if it works, or cached if it's expensive diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 4696c9f20b..0ee29eae64 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -663,7 +663,7 @@ public: } this->drawBitmapRectToRect(bitmap, realSrcPtr, dst, paint); } - + virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m, const SkPaint* paint = NULL); diff --git a/include/effects/SkMatrixConvolutionImageFilter.h b/include/effects/SkMatrixConvolutionImageFilter.h index 4409ebd40e..035b863a55 100644 --- a/include/effects/SkMatrixConvolutionImageFilter.h +++ b/include/effects/SkMatrixConvolutionImageFilter.h @@ -30,7 +30,7 @@ public: /** Construct a matrix convolution image filter. @param kernelSize The kernel size in pixels, in each dimension (N by M). - @param kernel The image processing kernel. Must contain N * M + @param kernel The image processing kernel. Must contain N * M elements, in row order. @param gain A scale factor applied to each pixel after convolution. This can be used to normalize the diff --git a/src/gpu/GrTHashCache.h b/src/gpu/GrTHashCache.h index 118b76a006..4494f9f024 100644 --- a/src/gpu/GrTHashCache.h +++ b/src/gpu/GrTHashCache.h @@ -13,8 +13,8 @@ #include "GrTDArray.h" -// GrTDefaultFindFunctor implements the default find behavior for -// GrTHashTable (i.e., return the first resource that matches the +// GrTDefaultFindFunctor implements the default find behavior for +// GrTHashTable (i.e., return the first resource that matches the // provided key) template class GrTDefaultFindFunctor { public: @@ -133,7 +133,7 @@ T* GrTHashTable::find(const Key& key, const FindFuncType& fin if (NULL != elem && Key::EQ(*elem, key) && findFunc(elem)) { return elem; - } + } // bsearch for the key in our sorted array int index = this->searchArray(key); diff --git a/tests/HashCacheTest.cpp b/tests/HashCacheTest.cpp index 8957c9300e..f26dd8abec 100644 --- a/tests/HashCacheTest.cpp +++ b/tests/HashCacheTest.cpp @@ -20,7 +20,7 @@ struct HashElement { class GrFindPositivesFunctor { public: // only return elements with positive values - bool operator()(const HashElement* elem) const { + bool operator()(const HashElement* elem) const { return elem->fValue > 0; } }; @@ -28,7 +28,7 @@ public: class GrFindNegativesFunctor { public: // only return elements with negative values - bool operator()(const HashElement* elem) const { + bool operator()(const HashElement* elem) const { return elem->fValue < 0; } }; @@ -67,28 +67,28 @@ static void TestHashCache(skiatest::Reporter* reporter, GrContext* context) { GrTHashTable cache; - HashElement negHashElements[10] = { - { 0, 0 }, + HashElement negHashElements[10] = { + { 0, 0 }, { 1, -1 }, - { 2, -2 }, - { 3, -3 }, - { 4, -4 }, - { 5, -5 }, - { 6, -6 }, - { 7, -7 }, - { 8, -8 }, + { 2, -2 }, + { 3, -3 }, + { 4, -4 }, + { 5, -5 }, + { 6, -6 }, + { 7, -7 }, + { 8, -8 }, { 9, -9 } }; - HashElement posHashElements[10] = { - { 0, 0 }, + HashElement posHashElements[10] = { + { 0, 0 }, { 1, 1 }, - { 2, 2 }, - { 3, 3 }, - { 4, 4 }, - { 5, 5 }, - { 6, 6 }, - { 7, 7 }, - { 8, 8 }, + { 2, 2 }, + { 3, 3 }, + { 4, 4 }, + { 5, 5 }, + { 6, 6 }, + { 7, 7 }, + { 8, 8 }, { 9, 9 } }; @@ -117,7 +117,7 @@ static void TestHashCache(skiatest::Reporter* reporter, GrContext* context) { } REPORTER_ASSERT(reporter, 20 == cache.count()); - + // test out the find functor to find all the positive values { GrFindPositivesFunctor findPos; -- 2.34.1