diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkPtrRecorder.h | 2 | ||||
-rw-r--r-- | include/core/SkTSearch.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/core/SkPtrRecorder.h b/include/core/SkPtrRecorder.h index 11fd17043e..2df84b245a 100644 --- a/include/core/SkPtrRecorder.h +++ b/include/core/SkPtrRecorder.h @@ -71,7 +71,7 @@ private: // is not related to its "index". SkTDArray<Pair> fList; - static int Cmp(const Pair& a, const Pair& b); + static int Cmp(const Pair* a, const Pair* b); typedef SkRefCnt INHERITED; }; diff --git a/include/core/SkTSearch.h b/include/core/SkTSearch.h index d5ab18ceda..abe727fe03 100644 --- a/include/core/SkTSearch.h +++ b/include/core/SkTSearch.h @@ -47,7 +47,7 @@ int SkTSearch(const T* base, int count, const T& target, size_t elemSize) template <typename T> int SkTSearch(const T* base, int count, const T& target, size_t elemSize, - int (*compare)(const T&, const T&)) + int (*compare)(const T*, const T*)) { SkASSERT(count >= 0); if (count <= 0) { @@ -63,14 +63,14 @@ int SkTSearch(const T* base, int count, const T& target, size_t elemSize, int mid = (hi + lo) >> 1; const T* elem = (const T*)((const char*)base + mid * elemSize); - if ((*compare)(*elem, target) < 0) + if ((*compare)(elem, &target) < 0) lo = mid + 1; else hi = mid; } const T* elem = (const T*)((const char*)base + hi * elemSize); - int pred = (*compare)(*elem, target); + int pred = (*compare)(elem, &target); if (pred != 0) { if (pred < 0) hi += 1; |