Merge pull request #5095 from igrechuhin/tts

[tts] [ios] Fixed vector allocation.
This commit is contained in:
Vladimir Byko-Ianko 2016-12-26 11:06:50 +03:00 committed by GitHub
commit 878955b266

View file

@ -19,7 +19,7 @@ NSString * const kDefaultLanguage = @"en-US";
vector<pair<string, string>> availableLanguages()
{
NSArray<AVSpeechSynthesisVoice *> * voices = [AVSpeechSynthesisVoice speechVoices];
vector<pair<string, string>> native(voices.count);
vector<pair<string, string>> native;
for (AVSpeechSynthesisVoice * v in voices)
native.emplace_back(make_pair(bcp47ToTwineLanguage(v.language), [v.language UTF8String]));