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

Unified Diff: src/gpu/gl/GrGLExtensions.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: fixes to compile on gcc 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
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/sfnt/SkOTTable_name.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLExtensions.cpp
diff --git a/src/gpu/gl/GrGLExtensions.cpp b/src/gpu/gl/GrGLExtensions.cpp
index a071923527759200da9ef4cb9c9a63f07bccbd01..633796ded8373417e82b975725a27fb152220f1b 100644
--- a/src/gpu/gl/GrGLExtensions.cpp
+++ b/src/gpu/gl/GrGLExtensions.cpp
@@ -13,8 +13,8 @@
#include "SkTSort.h"
namespace {
-inline int extension_compare(const SkString* a, const SkString* b) {
- return strcmp(a->c_str(), b->c_str());
+inline bool extension_compare(const SkString& a, const SkString& b) {
+ return strcmp(a.c_str(), b.c_str()) < 0;
}
}
@@ -67,7 +67,7 @@ bool GrGLExtensions::init(GrGLBinding binding,
}
}
if (0 != fStrings.count()) {
- SkTSearchCompareLTFunctor<SkString, extension_compare> cmp;
+ SkTLessFunctionToFunctorAdaptor<SkString, extension_compare> cmp;
SkTQSort(&fStrings.front(), &fStrings.back(), cmp);
}
return true;
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/sfnt/SkOTTable_name.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698