1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 20:19:57 +00:00

Code clarity

This commit is contained in:
MiroslavR 2014-10-20 01:10:08 +02:00
parent ed6bdc0bde
commit 5a7dbb19f7

View file

@ -87,23 +87,23 @@ namespace MWDialogue
for (std::vector<HyperTextParser::Token>::iterator tok = hypertext.begin(); tok != hypertext.end(); ++tok) for (std::vector<HyperTextParser::Token>::iterator tok = hypertext.begin(); tok != hypertext.end(); ++tok)
{ {
Misc::StringUtils::toLower(tok->mText); std::string topicId = Misc::StringUtils::lowerCase(tok->mText);
if (tok->isExplicitLink()) if (tok->isExplicitLink())
{ {
// calculation of standard form for all hyperlinks // calculation of standard form for all hyperlinks
size_t asterisk_count = HyperTextParser::removePseudoAsterisks(tok->mText); size_t asterisk_count = HyperTextParser::removePseudoAsterisks(topicId);
for(; asterisk_count > 0; --asterisk_count) for(; asterisk_count > 0; --asterisk_count)
tok->mText.append("*"); topicId.append("*");
tok->mText = mTranslationDataStorage.topicStandardForm(tok->mText); topicId = mTranslationDataStorage.topicStandardForm(topicId);
} }
if (tok->isImplicitKeyword() && mTranslationDataStorage.hasTranslation()) if (tok->isImplicitKeyword() && mTranslationDataStorage.hasTranslation())
continue; continue;
if (std::find(mActorKnownTopics.begin(), mActorKnownTopics.end(), tok->mText) != mActorKnownTopics.end()) if (std::find(mActorKnownTopics.begin(), mActorKnownTopics.end(), topicId) != mActorKnownTopics.end())
mKnownTopics[tok->mText] = true; mKnownTopics[topicId] = true;
} }
updateTopics(); updateTopics();