diff options
author | bungeman <bungeman@google.com> | 2016-04-14 09:44:34 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-14 09:44:34 -0700 |
commit | a821af83890d3b365c7b871f939737d47c48139c (patch) | |
tree | 5f888942bf21d15dccd1116a9926635a2c2e007b /tests/TypefaceTest.cpp | |
parent | fbcfd6d060f4d42e6b9de70f676564fcf1d97eb5 (diff) |
Put SkEmptyTypeface in anonymous namespace.
We ended up with two SkEmptyTypefaces it differnt places. Avoid this odr
violation by sticking these in anonymous namespaces.
Review URL: https://codereview.chromium.org/1887093002
Diffstat (limited to 'tests/TypefaceTest.cpp')
-rw-r--r-- | tests/TypefaceTest.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/TypefaceTest.cpp b/tests/TypefaceTest.cpp index 130cabf37a..950449d9c1 100644 --- a/tests/TypefaceTest.cpp +++ b/tests/TypefaceTest.cpp @@ -27,6 +27,8 @@ DEF_TEST(Typeface, reporter) { #endif } +namespace { + class SkEmptyTypeface : public SkTypeface { public: static sk_sp<SkTypeface> Create(SkFontID id) { return sk_sp<SkTypeface>(new SkEmptyTypeface(id)); } @@ -59,6 +61,8 @@ protected: size_t onGetTableData(SkFontTableTag, size_t, size_t, void*) const override { return 0; } }; +} + static bool count_proc(SkTypeface* face, void* ctx) { int* count = static_cast<int*>(ctx); *count = *count + 1; |