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

Unified Diff: tests/RTreeTest.cpp

Issue 1300163002: unsigned -> int for counts and indices in picture-related code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: (C) Created 5 years, 4 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 | « tests/PictureTest.cpp ('k') | tests/RecordDrawTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/RTreeTest.cpp
diff --git a/tests/RTreeTest.cpp b/tests/RTreeTest.cpp
index 16ccb4f508f6db4be910978a3a4c36c2c6045de1..b39af6747ebbd89d63b2ebc968472ac887ab7a5b 100644
--- a/tests/RTreeTest.cpp
+++ b/tests/RTreeTest.cpp
@@ -25,8 +25,8 @@ static SkRect random_rect(SkRandom& rand) {
return rect;
}
-static bool verify_query(SkRect query, SkRect rects[], SkTDArray<unsigned>& found) {
- SkTDArray<unsigned> expected;
+static bool verify_query(SkRect query, SkRect rects[], SkTDArray<int>& found) {
+ SkTDArray<int> expected;
// manually intersect with every rectangle
for (int i = 0; i < NUM_RECTS; ++i) {
if (SkRect::Intersects(query, rects[i])) {
@@ -46,7 +46,7 @@ static bool verify_query(SkRect query, SkRect rects[], SkTDArray<unsigned>& foun
static void run_queries(skiatest::Reporter* reporter, SkRandom& rand, SkRect rects[],
const SkRTree& tree) {
for (size_t i = 0; i < NUM_QUERIES; ++i) {
- SkTDArray<unsigned> hits;
+ SkTDArray<int> hits;
SkRect query = random_rect(rand);
tree.search(query, &hits);
REPORTER_ASSERT(reporter, verify_query(query, rects, hits));
« no previous file with comments | « tests/PictureTest.cpp ('k') | tests/RecordDrawTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698