summaryrefslogtreecommitdiff
path: root/libs/hwui/TextDropShadowCache.h
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-12-22 14:28:49 -0800
committerChris Craik <ccraik@google.com>2014-12-22 14:56:08 -0800
commite84a208317e0ed388fcdad1e6743c7849acb51b0 (patch)
tree8c057e6b6367a85790c30a118e6c8789c6bdf538 /libs/hwui/TextDropShadowCache.h
parent07adacf4996c8ca494332ec938786fa15832c722 (diff)
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
Diffstat (limited to 'libs/hwui/TextDropShadowCache.h')
-rw-r--r--libs/hwui/TextDropShadowCache.h8
1 files changed, 4 insertions, 4 deletions
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);