Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Unified Diff: src/core/SkPathMeasure.cpp

Issue 15070011: One SkTSearch to rule them all. Allow key to be of different type than the array. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Make functor for op < variant of SkTSearch, some renamings Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/core/SkPathMeasure.cpp
diff --git a/src/core/SkPathMeasure.cpp b/src/core/SkPathMeasure.cpp
index c97c826846fb6e368ec10612f53c5e83f0290347..af2579fff186e022a2cd15623a140a9aa550b31c 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];

Powered by Google App Engine
This is Rietveld 408576698