diff options
author | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-04-09 07:01:27 +0000 |
---|---|---|
committer | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-04-09 07:01:27 +0000 |
commit | 3284017a60ea4fc3dc5b95838ba0c301ee1e4e8d (patch) | |
tree | 0318a5fc58b43774f820f8f2beddbe9870ec7a9a /src | |
parent | 8e029e6e59024b80e8f71924369a540699754de3 (diff) |
Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8568 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkError.cpp | 14 | ||||
-rw-r--r-- | src/core/SkErrorInternals.h | 4 | ||||
-rw-r--r-- | src/core/SkPath.cpp | 6 | ||||
-rw-r--r-- | src/pathops/SkAddIntersections.h | 1 | ||||
-rw-r--r-- | src/pathops/SkOpAngle.cpp | 1 | ||||
-rw-r--r-- | src/pathops/SkOpContour.cpp | 1 | ||||
-rw-r--r-- | src/pathops/SkOpContour.h | 8 | ||||
-rw-r--r-- | src/pathops/SkOpSegment.cpp | 2 | ||||
-rw-r--r-- | src/pathops/SkOpSegment.h | 4 | ||||
-rw-r--r-- | src/pathops/SkPathOpsBounds.h | 2 | ||||
-rw-r--r-- | src/pathops/SkPathOpsCommon.cpp | 3 | ||||
-rw-r--r-- | src/pathops/SkPathOpsDebug.h | 4 | ||||
-rw-r--r-- | src/pathops/SkPathOpsTriangle.h | 2 | ||||
-rw-r--r-- | src/pathops/SkPathWriter.h | 4 | ||||
-rw-r--r-- | src/pathops/SkQuarticRoot.cpp | 2 |
15 files changed, 27 insertions, 31 deletions
diff --git a/src/core/SkError.cpp b/src/core/SkError.cpp index 3555c6961c..f5d233c6da 100644 --- a/src/core/SkError.cpp +++ b/src/core/SkError.cpp @@ -34,7 +34,7 @@ namespace { #define THREAD_ERROR_CALLBACK \ *(reinterpret_cast<SkErrorCallbackFunction *>(SkTLS::Get(CreateThreadErrorCallback, \ DeleteThreadErrorCallback))) - + void *CreateThreadErrorContext() { return SkNEW_ARGS(void **, (NULL)); } @@ -99,7 +99,7 @@ const char *SkErrorInternals::GetLastErrorString() { void SkErrorInternals::SetError(SkError code, const char *fmt, ...) { THREAD_ERROR = code; va_list args; - + char *str = THREAD_ERROR_STRING; const char *error_name = NULL; switch( code ) { @@ -107,10 +107,10 @@ void SkErrorInternals::SetError(SkError code, const char *fmt, ...) { error_name = "No Error"; break; case kInvalidArgument_SkError: - error_name = "Invalid Argument"; + error_name = "Invalid Argument"; break; - case kInvalidOperation_SkError: - error_name = "Invalid Operation"; + case kInvalidOperation_SkError: + error_name = "Invalid Operation"; break; case kInvalidHandle_SkError: error_name = "Invalid Handle"; @@ -128,11 +128,11 @@ void SkErrorInternals::SetError(SkError code, const char *fmt, ...) { error_name = "Unknown error"; break; } - + sprintf( str, "%s: ", error_name ); int string_left = ERROR_STRING_LENGTH - strlen( str ); str += strlen(str); - + va_start( args, fmt ); vsnprintf( str, string_left, fmt, args ); va_end( args ); diff --git a/src/core/SkErrorInternals.h b/src/core/SkErrorInternals.h index 778d539866..65ff231821 100644 --- a/src/core/SkErrorInternals.h +++ b/src/core/SkErrorInternals.h @@ -12,7 +12,7 @@ #include "SkError.h" class SkErrorInternals { - + public: static void ClearError(); static void SetError(SkError code, const char *fmt, ...); @@ -21,7 +21,7 @@ public: static void SetErrorCallback(SkErrorCallbackFunction cb, void *context); static void DefaultErrorCallback(SkError code, void *context); }; - + #endif /* SkErrorInternals_DEFINED */ diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp index e029d438fd..7ea102884f 100644 --- a/src/core/SkPath.cpp +++ b/src/core/SkPath.cpp @@ -1035,11 +1035,11 @@ bool SkPath::hasOnlyMoveTos() const { void SkPath::addRoundRect(const SkRect& rect, SkScalar rx, SkScalar ry, Direction dir) { assert_known_direction(dir); - + if (rx < 0 || ry < 0) { - SkErrorInternals::SetError( kInvalidArgument_SkError, + SkErrorInternals::SetError( kInvalidArgument_SkError, "I got %f and %f as radii to SkPath::AddRoundRect, " - "but negative radii are not allowed.", + "but negative radii are not allowed.", SkScalarToDouble(rx), SkScalarToDouble(ry) ); return; } diff --git a/src/pathops/SkAddIntersections.h b/src/pathops/SkAddIntersections.h index 26cfa9633f..b5727a440c 100644 --- a/src/pathops/SkAddIntersections.h +++ b/src/pathops/SkAddIntersections.h @@ -16,4 +16,3 @@ void AddSelfIntersectTs(SkOpContour* test); void CoincidenceCheck(SkTDArray<SkOpContour*>* contourList, int total); #endif - diff --git a/src/pathops/SkOpAngle.cpp b/src/pathops/SkOpAngle.cpp index fd1e0f4cd0..2a9ebebd87 100644 --- a/src/pathops/SkOpAngle.cpp +++ b/src/pathops/SkOpAngle.cpp @@ -252,4 +252,3 @@ void SkOpAngle::setSpans() { fUnsortable = true; #endif } - diff --git a/src/pathops/SkOpContour.cpp b/src/pathops/SkOpContour.cpp index e68341cfd0..54eecfab51 100644 --- a/src/pathops/SkOpContour.cpp +++ b/src/pathops/SkOpContour.cpp @@ -262,4 +262,3 @@ void SkOpContour::setBounds() { fBounds.add(fSegments[index].bounds()); } } - diff --git a/src/pathops/SkOpContour.h b/src/pathops/SkOpContour.h index 2f1c48175a..2f1dbd51fa 100644 --- a/src/pathops/SkOpContour.h +++ b/src/pathops/SkOpContour.h @@ -132,7 +132,7 @@ public: } SkOpSegment* nonVerticalSegment(int* start, int* end); - + bool operand() const { return fOperand; } @@ -168,13 +168,13 @@ public: } void sortSegments(); - + const SkPoint& start() const { return fSegments.front().pts()[0]; } - + void toPath(SkPathWriter* path) const; - + void toPartialBackward(SkPathWriter* path) const { int segmentCount = fSegments.count(); for (int test = segmentCount - 1; test >= 0; --test) { diff --git a/src/pathops/SkOpSegment.cpp b/src/pathops/SkOpSegment.cpp index 627b0af9d4..79ecc662da 100644 --- a/src/pathops/SkOpSegment.cpp +++ b/src/pathops/SkOpSegment.cpp @@ -2490,7 +2490,7 @@ void SkOpSegment::zeroSpan(SkOpSpan* span) { span->fDone = true; ++fDoneSpans; } - + #if DEBUG_SWAP_TOP bool SkOpSegment::controlsContainedByEnds(int tStart, int tEnd) const { if (fVerb != SkPath::kCubic_Verb) { diff --git a/src/pathops/SkOpSegment.h b/src/pathops/SkOpSegment.h index 1e9eb4b09a..dd51ab89e6 100644 --- a/src/pathops/SkOpSegment.h +++ b/src/pathops/SkOpSegment.h @@ -180,7 +180,7 @@ public: void updatePts(const SkPoint pts[]) { fPts = pts; } - + SkPath::Verb verb() const { return fVerb; } @@ -213,7 +213,7 @@ public: const SkPoint& xyAtT(int index) const { return xyAtT(&fTs[index]); } - + SkScalar yAtT(int index) const { return yAtT(&fTs[index]); } diff --git a/src/pathops/SkPathOpsBounds.h b/src/pathops/SkPathOpsBounds.h index 8102032813..e4dd030ecb 100644 --- a/src/pathops/SkPathOpsBounds.h +++ b/src/pathops/SkPathOpsBounds.h @@ -52,7 +52,7 @@ struct SkPathOpsBounds : public SkRect { fLeft = fRight = pt.fX; fTop = fBottom = pt.fY; } - + typedef SkRect INHERITED; }; diff --git a/src/pathops/SkPathOpsCommon.cpp b/src/pathops/SkPathOpsCommon.cpp index 0a65bc9256..1a6f0f5c40 100644 --- a/src/pathops/SkPathOpsCommon.cpp +++ b/src/pathops/SkPathOpsCommon.cpp @@ -324,7 +324,7 @@ SkOpSegment* FindSortableTop(const SkTDArray<SkOpContour*>& contourList, bool* f // if only remaining candidates are vertical, then they can be marked done SkASSERT(*indexPtr != *endIndexPtr && *indexPtr >= 0 && *endIndexPtr >= 0); skipVertical(contourList, ¤t, indexPtr, endIndexPtr); - + SkASSERT(*indexPtr != *endIndexPtr && *indexPtr >= 0 && *endIndexPtr >= 0); tryAgain = false; contourWinding = rightAngleWinding(contourList, ¤t, indexPtr, endIndexPtr, &tHit, @@ -575,4 +575,3 @@ void Assemble(const SkPathWriter& path, SkPathWriter* simple) { } #endif } - diff --git a/src/pathops/SkPathOpsDebug.h b/src/pathops/SkPathOpsDebug.h index 16ca176831..9735112689 100644 --- a/src/pathops/SkPathOpsDebug.h +++ b/src/pathops/SkPathOpsDebug.h @@ -22,10 +22,10 @@ #ifdef SK_BUILD_FOR_WIN #define SK_RAND(seed) rand() - #define SK_SNPRINTF _snprintf + #define SK_SNPRINTF _snprintf #else #define SK_RAND(seed) rand_r(&seed) - #define SK_SNPRINTF snprintf + #define SK_SNPRINTF snprintf #endif void mathematica_ize(char* str, size_t bufferSize); diff --git a/src/pathops/SkPathOpsTriangle.h b/src/pathops/SkPathOpsTriangle.h index cbeea8cc76..8cc8c6d3b5 100644 --- a/src/pathops/SkPathOpsTriangle.h +++ b/src/pathops/SkPathOpsTriangle.h @@ -12,7 +12,7 @@ struct SkDTriangle { SkDPoint fPts[3]; - + bool contains(const SkDPoint& pt) const; }; diff --git a/src/pathops/SkPathWriter.h b/src/pathops/SkPathWriter.h index 2989b357ff..f90a580f5c 100644 --- a/src/pathops/SkPathWriter.h +++ b/src/pathops/SkPathWriter.h @@ -25,11 +25,11 @@ public: void nudge(); void quadTo(const SkPoint& pt1, const SkPoint& pt2); bool someAssemblyRequired() const; - + private: bool changedSlopes(const SkPoint& pt) const; void moveTo(); - + SkPath* fPathPtr; SkPoint fDefer[2]; SkPoint fFirstPt; diff --git a/src/pathops/SkQuarticRoot.cpp b/src/pathops/SkQuarticRoot.cpp index 09a92c66a2..596d2a25d6 100644 --- a/src/pathops/SkQuarticRoot.cpp +++ b/src/pathops/SkQuarticRoot.cpp @@ -73,7 +73,7 @@ int SkReducedQuarticRoots(const double t4, const double t3, const double t2, con if (oneHint) { SkASSERT(approximately_zero(t4 + t3 + t2 + t1 + t0)); // 1 is one root // note that -C == A + B + D + E - int num = SkDCubic::RootsReal(t4, t4 + t3, -(t1 + t0), -t0, roots); + int num = SkDCubic::RootsReal(t4, t4 + t3, -(t1 + t0), -t0, roots); for (int i = 0; i < num; ++i) { if (approximately_equal(roots[i], 1)) { return num; |