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

Unified Diff: tests/RecordTestUtils.h

Issue 1824983003: SkRecord: infer return type for visit() and mutate(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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/RecordTest.cpp ('k') | tests/RecorderTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/RecordTestUtils.h
diff --git a/tests/RecordTestUtils.h b/tests/RecordTestUtils.h
index a281566652f3b97722158fb5edf5f784101984db..853ee219080ca93a0a95d1b384ca83c7102b64a7 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;
}
}
« no previous file with comments | « tests/RecordTest.cpp ('k') | tests/RecorderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698