diff options
author | Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> | 2013-07-25 11:45:53 +0530 |
---|---|---|
committer | Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> | 2013-11-01 08:39:54 +0100 |
commit | 6e3ba00eae4c6b2703e9cfce4abced0d77009405 (patch) | |
tree | 1338c682175838ed9b5fbbc61c1f3a4f22fd56aa | |
parent | 7fe0ff02b05c6df8f4a88f5d9d9b50b567efdd21 (diff) | |
download | base-6e3ba00eae4c6b2703e9cfce4abced0d77009405.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 9e685168a72a..25fc972034df 100644 --- a/core/jni/android/graphics/TextLayoutCache.cpp +++ b/core/jni/android/graphics/TextLayoutCache.cpp @@ -142,7 +142,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; @@ -153,7 +153,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) { @@ -163,7 +163,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 { @@ -183,7 +183,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(); @@ -226,7 +226,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(); |