From e84a208317e0ed388fcdad1e6743c7849acb51b0 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Mon, 22 Dec 2014 14:28:49 -0800 Subject: Add overrides and switch to nullptr keyword Changes generated with clang-modernize. Additionally, fixed some struct-vs-class usage to make clang happy. Change-Id: Ic6ef2427401ff1e794d26f21f7b44868fc75fb72 --- libs/hwui/TextDropShadowCache.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libs/hwui/TextDropShadowCache.h') diff --git a/libs/hwui/TextDropShadowCache.h b/libs/hwui/TextDropShadowCache.h index bb53a23dc9dd..caf089f6d2a5 100644 --- a/libs/hwui/TextDropShadowCache.h +++ b/libs/hwui/TextDropShadowCache.h @@ -34,8 +34,8 @@ class Caches; class FontRenderer; struct ShadowText { - ShadowText(): len(0), radius(0.0f), textSize(0.0f), typeface(NULL), - flags(0), italicStyle(0.0f), scaleX(0), text(NULL), positions(NULL) { + ShadowText(): len(0), radius(0.0f), textSize(0.0f), typeface(nullptr), + flags(0), italicStyle(0.0f), scaleX(0), text(nullptr), positions(nullptr) { } // len is the number of bytes in text @@ -76,7 +76,7 @@ struct ShadowText { uint32_t charCount = len / sizeof(char16_t); str.setTo((const char16_t*) text, charCount); text = str.string(); - if (positions != NULL) { + if (positions != nullptr) { positionsCopy.clear(); positionsCopy.appendArray(positions, charCount * 2); positions = positionsCopy.array(); @@ -134,7 +134,7 @@ public: * Used as a callback when an entry is removed from the cache. * Do not invoke directly. */ - void operator()(ShadowText& text, ShadowTexture*& texture); + void operator()(ShadowText& text, ShadowTexture*& texture) override; ShadowTexture* get(const SkPaint* paint, const char* text, uint32_t len, int numGlyphs, float radius, const float* positions); -- cgit v1.2.3-59-g8ed1b