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

Unified Diff: src/gpu/GrRedBlackTree.h

Issue 176903003: Add GrSet class built on top of RedBlackTree (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Bench Added Created 6 years, 10 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/gpu/GrRedBlackTree.h
diff --git a/src/gpu/GrRedBlackTree.h b/src/gpu/GrRedBlackTree.h
index db36e32d0473b1ebbb7444845bc5af2580f39eb2..8cb04bb14d13ee24d7ed775304794ee039b54b96 100644
--- a/src/gpu/GrRedBlackTree.h
+++ b/src/gpu/GrRedBlackTree.h
@@ -11,6 +11,8 @@
#include "GrConfig.h"
#include "SkTypes.h"
+#include <cstring>
bsalomon 2014/02/26 21:56:09 I notice in other places we #include string.h and
+
template <typename T>
class GrLess {
public:
@@ -23,6 +25,11 @@ public:
bool operator()(const T* a, const T* b) const { return *a < *b; }
};
+class GrStrLess {
+public:
+ bool operator()(const char* a, const char* b) const { return std::strcmp(a,b) < 0; }
+};
+
/**
* In debug build this will cause full traversals of the tree when the validate
* is called on insert and remove. Useful for debugging but very slow.

Powered by Google App Engine
This is Rietveld 408576698