Merge "Deep-copying sucks when all you want is a borrow" into mnc-dev

This commit is contained in:
John Reck
2015-07-10 01:02:38 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ FontStyle MinikinUtils::prepareMinikinPaint(MinikinPaint* minikinPaint, FontColl
FontStyle resolved = resolvedFace->fStyle;
/* Prepare minikin FontStyle */
std::string lang = paint->getTextLocale();
const std::string& lang = paint->getTextLocale();
FontLanguage minikinLang(lang.c_str(), lang.size());
FontVariant minikinVariant = (paint->getFontVariant() == VARIANT_ELEGANT) ? VARIANT_ELEGANT
: VARIANT_COMPACT;

View File

@@ -57,7 +57,7 @@ public:
mTextLocale = textLocale;
}
std::string getTextLocale() const {
const std::string& getTextLocale() const {
return mTextLocale;
}