aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPathMeasure.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-17 19:05:03 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-17 19:05:03 +0000
commit20f7f173e05b60f541910d0c1da9850ac73e2958 (patch)
tree6d06f639a90e18a85b6188eed1a15854b96888fd /src/core/SkPathMeasure.cpp
parentd7c37425805d5909ed5601bf2fbf14d5c8b4c86b (diff)
One SkTSearch to rule them all. Allow key to be of different type than the array.
R=bungeman@google.com Review URL: https://codereview.chromium.org/15070011 git-svn-id: http://skia.googlecode.com/svn/trunk@9182 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkPathMeasure.cpp')
-rw-r--r--src/core/SkPathMeasure.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/SkPathMeasure.cpp b/src/core/SkPathMeasure.cpp
index c97c826846..af2579fff1 100644
--- a/src/core/SkPathMeasure.cpp
+++ b/src/core/SkPathMeasure.cpp
@@ -389,8 +389,7 @@ const SkPathMeasure::Segment* SkPathMeasure::distanceToSegment(
const Segment* seg = fSegments.begin();
int count = fSegments.count();
- int index = SkTSearch<SkScalar>(&seg->fDistance, count, distance,
- sizeof(Segment));
+ int index = SkTSearch<SkScalar>(&seg->fDistance, count, distance, sizeof(Segment));
// don't care if we hit an exact match or not, so we xor index if it is negative
index ^= (index >> 31);
seg = &seg[index];