Enable ClangTidy check readability-static-accessed-through-instance.
Our codebase generally tends to avoid this pattern naturally, and this
can catch real mistakes, e.g. http://review.skia.org/308659
https://clang.llvm.org/extra/clang-tidy/checks/readability-static-accessed-through-instance.html
Change-Id: I3b37ab6242bcca310bbbec718facdd8687f9c4ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308658
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
diff --git a/samplecode/SampleAAGeometry.cpp b/samplecode/SampleAAGeometry.cpp
index b500785..3ac60c1 100644
--- a/samplecode/SampleAAGeometry.cpp
+++ b/samplecode/SampleAAGeometry.cpp
@@ -1248,7 +1248,7 @@
}
void quad_coverage(SkPoint pts[3], uint8_t* distanceMap, int w, int h) {
- SkScalar dist = pts[0].Distance(pts[0], pts[2]);
+ SkScalar dist = SkPoint::Distance(pts[0], pts[2]);
if (dist < gCurveDistance) {
(void) coverage(pts[0], pts[2], distanceMap, w, h);
return;
@@ -1260,7 +1260,7 @@
}
void conic_coverage(SkPoint pts[3], SkScalar weight, uint8_t* distanceMap, int w, int h) {
- SkScalar dist = pts[0].Distance(pts[0], pts[2]);
+ SkScalar dist = SkPoint::Distance(pts[0], pts[2]);
if (dist < gCurveDistance) {
(void) coverage(pts[0], pts[2], distanceMap, w, h);
return;
@@ -1275,7 +1275,7 @@
}
void cubic_coverage(SkPoint pts[4], uint8_t* distanceMap, int w, int h) {
- SkScalar dist = pts[0].Distance(pts[0], pts[3]);
+ SkScalar dist = SkPoint::Distance(pts[0], pts[3]);
if (dist < gCurveDistance) {
(void) coverage(pts[0], pts[3], distanceMap, w, h);
return;