* commit '31b81b3cb94befad39d1632d449b0a4d6eedf604': Deep-copying sucks when all you want is a borrow
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
mTextLocale = textLocale;
|
||||
}
|
||||
|
||||
std::string getTextLocale() const {
|
||||
const std::string& getTextLocale() const {
|
||||
return mTextLocale;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user