diff options
author | Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> | 2013-07-25 11:45:53 +0530 |
---|---|---|
committer | Ubuntu <vishal.bhoj@linaro.org> | 2014-06-05 09:53:11 +0000 |
commit | f5a99e4acef82f1e3f104f3e03d4b012e9a2db17 (patch) | |
tree | ffd6904681888f1f1a1a5eff9a5f2e24668f7f63 | |
parent | 317c68fbbc5a06fc1444d94317349262874d59d8 (diff) | |
download | base-f5a99e4acef82f1e3f104f3e03d4b012e9a2db17.tar.gz |
frameworks/base: Fix compile errors
Fix ISO C++11 incompatibility in TextLayoutCache and
aliasing violation in FontRenderer
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
-rw-r--r-- | core/jni/android/graphics/TextLayoutCache.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/jni/android/graphics/TextLayoutCache.cpp b/core/jni/android/graphics/TextLayoutCache.cpp index e8afe0613f98..7ffcada200a5 100644 --- a/core/jni/android/graphics/TextLayoutCache.cpp +++ b/core/jni/android/graphics/TextLayoutCache.cpp @@ -143,7 +143,7 @@ sp<TextLayoutValue> TextLayoutCache::getValue(const SkPaint* paint, "This indicates that the cache already has an entry with the " "same key but it should not since we checked earlier!" " - start = %d, count = %d, contextCount = %d - Text = '%s'", - start, count, contextCount, String8(key.getText() + start, count).string()); + start, count, contextCount, String8(reinterpret_cast<const char16_t*>(key.getText() + start), count).string()); if (mDebugEnabled) { nsecs_t totalTime = systemTime(SYSTEM_TIME_MONOTONIC) - startTime; @@ -154,7 +154,7 @@ sp<TextLayoutValue> TextLayoutCache::getValue(const SkPaint* paint, value.get(), start, count, contextCount, size, mMaxSize - mSize, value->getElapsedTime() * 0.000001f, (totalTime - value->getElapsedTime()) * 0.000001f, - String8(key.getText() + start, count).string()); + String8(reinterpret_cast<const char16_t*>(key.getText() + start), count).string()); } } else { if (mDebugEnabled) { @@ -164,7 +164,7 @@ sp<TextLayoutValue> TextLayoutCache::getValue(const SkPaint* paint, " - Compute time %0.6f ms - Text = '%s'", start, count, contextCount, size, mMaxSize - mSize, value->getElapsedTime() * 0.000001f, - String8(key.getText() + start, count).string()); + String8(reinterpret_cast<const char16_t*>(key.getText() + start), count).string()); } } } else { @@ -184,7 +184,7 @@ sp<TextLayoutValue> TextLayoutCache::getValue(const SkPaint* paint, value->getElapsedTime() * 0.000001f, elapsedTimeThruCacheGet * 0.000001f, deltaPercent, - String8(key.getText() + start, count).string()); + String8(reinterpret_cast<const char16_t*>(key.getText() + start), count).string()); } if (mCacheHitCount % DEFAULT_DUMP_STATS_CACHE_HIT_INTERVAL == 0) { dumpCacheStats(); @@ -227,7 +227,7 @@ TextLayoutCacheKey::TextLayoutCacheKey(const SkPaint* paint, const UChar* text, size_t start, size_t count, size_t contextCount, int dirFlags) : start(start), count(count), contextCount(contextCount), dirFlags(dirFlags) { - textCopy.setTo(text, contextCount); + textCopy.setTo(reinterpret_cast<const char16_t*>(text), contextCount); typeface = paint->getTypeface(); textSize = paint->getTextSize(); textSkewX = paint->getTextSkewX(); |