aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-03-22 11:46:53 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-22 11:46:53 -0700
commit343a63d082bda969d7e8a4e09ba850e931185269 (patch)
treeaa2a1e863307c6dd6d4499a7a09fb40115b189d8 /tests
parentd33fe1f1f91a44458ee1a35a83788df74df16c07 (diff)
SkRecord: infer return type for visit() and mutate().
Diffstat (limited to 'tests')
-rw-r--r--tests/RecordTest.cpp4
-rw-r--r--tests/RecordTestUtils.h6
-rw-r--r--tests/RecorderTest.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/RecordTest.cpp b/tests/RecordTest.cpp
index e613b425fd..1b4077cce8 100644
--- a/tests/RecordTest.cpp
+++ b/tests/RecordTest.cpp
@@ -29,7 +29,7 @@ public:
void apply(const SkRecord& record) {
for (int i = 0; i < record.count(); i++) {
- record.visit<void>(i, *this);
+ record.visit(i, *this);
}
}
@@ -47,7 +47,7 @@ struct Stretch {
void apply(SkRecord* record) {
for (int i = 0; i < record->count(); i++) {
- record->mutate<void>(i, *this);
+ record->mutate(i, *this);
}
}
};
diff --git a/tests/RecordTestUtils.h b/tests/RecordTestUtils.h
index a281566652..853ee21908 100644
--- a/tests/RecordTestUtils.h
+++ b/tests/RecordTestUtils.h
@@ -30,7 +30,7 @@ struct ReadAs {
template <typename T>
static const T* assert_type(skiatest::Reporter* r, const SkRecord& record, int index) {
ReadAs<T> reader;
- record.visit<void>(index, reader);
+ record.visit(index, reader);
REPORTER_ASSERT(r, T::kType == reader.type);
REPORTER_ASSERT(r, SkToBool(reader.ptr));
return reader.ptr;
@@ -45,7 +45,7 @@ template <typename DrawT> int count_instances_of_type(const SkRecord& record) {
MatchType<DrawT> matcher;
int counter = 0;
for (int i = 0; i < record.count(); i++) {
- counter += record.visit<int>(i, matcher);
+ counter += record.visit(i, matcher);
}
return counter;
}
@@ -53,7 +53,7 @@ template <typename DrawT> int count_instances_of_type(const SkRecord& record) {
template <typename DrawT> int find_first_instances_of_type(const SkRecord& record) {
MatchType<DrawT> matcher;
for (int i = 0; i < record.count(); i++) {
- if (record.visit<int>(i, matcher)) {
+ if (record.visit(i, matcher)) {
return i;
}
}
diff --git a/tests/RecorderTest.cpp b/tests/RecorderTest.cpp
index b1af1388fb..59d5a8e6cd 100644
--- a/tests/RecorderTest.cpp
+++ b/tests/RecorderTest.cpp
@@ -31,7 +31,7 @@ public:
void apply(const SkRecord& record) {
for (int i = 0; i < record.count(); i++) {
- record.visit<void>(i, *this);
+ record.visit(i, *this);
}
}