From ffab15f60e784dfb7c29608968dc3030c3f7fc68 Mon Sep 17 00:00:00 2001 From: reed Date: Sat, 11 Apr 2015 19:29:31 -0700 Subject: [PATCH] use anon namespace to avoid (silent) collisions between local test classes BUG=skia: TBR= Review URL: https://codereview.chromium.org/1079813002 --- gm/drawfilter.cpp | 2 ++ tests/DrawFilterTest.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/gm/drawfilter.cpp b/gm/drawfilter.cpp index 40323c9ac8..8c29f07b02 100644 --- a/gm/drawfilter.cpp +++ b/gm/drawfilter.cpp @@ -19,6 +19,7 @@ * the second red and sharp. */ +namespace { class TestFilter : public SkDrawFilter { public: bool filter(SkPaint* p, Type) override { @@ -27,6 +28,7 @@ public: return true; } }; +} class DrawFilterGM : public skiagm::GM { SkAutoTUnref fBlur; diff --git a/tests/DrawFilterTest.cpp b/tests/DrawFilterTest.cpp index d01fa07338..13ae5c6bd0 100644 --- a/tests/DrawFilterTest.cpp +++ b/tests/DrawFilterTest.cpp @@ -10,12 +10,14 @@ #include "SkSurface.h" #include "Test.h" +namespace { class TestFilter : public SkDrawFilter { public: bool filter(SkPaint* p, Type) override { return true; } }; +} /** * canvas.setDrawFilter is defined to be local to the save/restore block, such that if you