aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/src
diff options
context:
space:
mode:
authorGravatar tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-15 16:50:27 +0000
committerGravatar tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-15 16:50:27 +0000
commita87cd2af4c7f46ba8437c2e500805c9deb9e3a40 (patch)
tree3575a755aadb578f677d83a995bc6a2a74fe8bf6 /gpu/src
parent2c8208f3a444098aee562f5a1ef620142807eda2 (diff)
Increase compatibility with clang, mostly around SK_RESTRICT.
Attempting to fix up our use of __restrict__ so Chrome can enable it. git-svn-id: http://skia.googlecode.com/svn/trunk@1597 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/src')
-rw-r--r--gpu/src/gr_unittests.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/gpu/src/gr_unittests.cpp b/gpu/src/gr_unittests.cpp
index 338f2cc35e..2af0def1f5 100644
--- a/gpu/src/gr_unittests.cpp
+++ b/gpu/src/gr_unittests.cpp
@@ -15,13 +15,23 @@
*/
+#include "GrBinHashKey.h"
#include "GrDrawTarget.h"
-#include "GrTDArray.h"
-#include "GrTBSearch.h"
#include "GrMatrix.h"
-#include "GrRedBlackTree.h"
#include "GrPath.h"
-#include "GrBinHashKey.h"
+#include "GrRedBlackTree.h"
+#include "GrTDArray.h"
+
+// If we aren't inheriting these as #defines from elsewhere,
+// clang demands they be declared before we #include the template
+// that relies on them.
+static bool LT(const int& elem, int value) {
+ return elem < value;
+}
+static bool EQ(const int& elem, int value) {
+ return elem == value;
+}
+#include "GrTBSearch.h"
static void dump(const GrTDArray<int>& array) {
#if 0
@@ -53,12 +63,6 @@ static void test_tdarray() {
GrAssert(array.count() == 4);
}
-static bool LT(const int& elem, int value) {
- return elem < value;
-}
-static bool EQ(const int& elem, int value) {
- return elem == value;
-}
static void test_bsearch() {
const int array[] = {