summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Dürr <hdu@apache.org>2013-04-16 11:20:17 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-09 12:03:39 +0100
commitb4d9ed143471659ef0905379c5ebd60ee711c1e4 (patch)
tree42fd5a54ba403b54d92f2d429d8482e3df8b3478
parent19b217505d094577392d8712b9d07f29b3de2081 (diff)
small optimization, don't call objectAtIndex twice
(cherry picked from commit a88630fb326fa4dcbe28edd1c149c8e5e7b7f123) Conflicts: lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx Change-Id: Ic48281be27bf43f8a564f46684ddb53a2d83d80e
-rw-r--r--lingucomponent/source/spellcheck/macosxspell/macspellimp.mm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
index c2ca43895f91..64cc1c1421a6 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
@@ -120,9 +120,10 @@ Sequence< Locale > SAL_CALL MacSpellChecker::getLocales()
//Test for existence of the dictionaries
for (unsigned int i = 0; i < [aLocales count]; i++)
{
- if( [macSpell setLanguage:[aLocales objectAtIndex:i] ] )
+ NSString* pLangStr = (NSString*)[aLocales objectAtIndex:i];
+ if( [macSpell setLanguage:pLangStr ] )
{
- postspdict.push_back( [ aLocales objectAtIndex:i ] );
+ postspdict.push_back( pLangStr );
}
}