diff options
author | 2012-04-12 19:44:38 +0000 | |
---|---|---|
committer | 2012-04-12 19:44:38 +0000 | |
commit | f3edf9fdc902465941cb763b9b4fdbfe7d004fd2 (patch) | |
tree | d8d3106744ac5dc42229ccbaad1c7b58aa696e96 /include/core/SkPathMeasure.h | |
parent | 1610a685e0333c62646d0ee17e4371aedaecc64d (diff) |
add SK_WARN_UNUSED_RESULT warning to SkPathMeasure methods that might leave
POD var-arguments uninitialized.
git-svn-id: http://skia.googlecode.com/svn/trunk@3665 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkPathMeasure.h')
-rw-r--r-- | include/core/SkPathMeasure.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/core/SkPathMeasure.h b/include/core/SkPathMeasure.h index 6fb4482ad9..3419e6683f 100644 --- a/include/core/SkPathMeasure.h +++ b/include/core/SkPathMeasure.h @@ -29,7 +29,7 @@ public: a different path (or null), since the measure object keeps a pointer to the path object (does not copy its data). */ - void setPath(const SkPath*, bool forceClosed); + void setPath(const SkPath*, bool forceClosed); /** Return the total length of the current contour, or 0 if no path is associated (e.g. resetPath(null)) @@ -41,19 +41,23 @@ public: Returns false if there is no path, or a zero-length path was specified, in which case position and tangent are unchanged. */ - bool getPosTan(SkScalar distance, SkPoint* position, SkVector* tangent); + bool SK_WARN_UNUSED_RESULT getPosTan(SkScalar distance, SkPoint* position, + SkVector* tangent); enum MatrixFlags { kGetPosition_MatrixFlag = 0x01, kGetTangent_MatrixFlag = 0x02, kGetPosAndTan_MatrixFlag = kGetPosition_MatrixFlag | kGetTangent_MatrixFlag }; + /** Pins distance to 0 <= distance <= getLength(), and then computes the corresponding matrix (by calling getPosTan). Returns false if there is no path, or a zero-length path was specified, in which case matrix is unchanged. */ - bool getMatrix(SkScalar distance, SkMatrix* matrix, MatrixFlags flags = kGetPosAndTan_MatrixFlag); + bool SK_WARN_UNUSED_RESULT getMatrix(SkScalar distance, SkMatrix* matrix, + MatrixFlags flags = kGetPosAndTan_MatrixFlag); + /** Given a start and stop distance, return in dst the intervening segment(s). If the segment is zero-length, return false, else return true. startD and stopD are pinned to legal values (0..getLength()). If startD <= stopD |