renaming of translation component; removing of C++11 features

actorid
lazydev 12 years ago
parent 74ae479780
commit 1f71395660

@ -8,7 +8,7 @@
#include <components/bsa/bsa_archive.hpp> #include <components/bsa/bsa_archive.hpp>
#include <components/files/configurationmanager.hpp> #include <components/files/configurationmanager.hpp>
#include <components/translation_data/translation_data.hpp> #include <components/translation/translation.hpp>
#include <components/nifoverrides/nifoverrides.hpp> #include <components/nifoverrides/nifoverrides.hpp>
#include <components/nifbullet/bullet_nif_loader.hpp> #include <components/nifbullet/bullet_nif_loader.hpp>
@ -336,7 +336,7 @@ void OMW::Engine::go()
mResDir, mCfgMgr.getCachePath(), mNewGame, mEncoding, mFallbackMap)); mResDir, mCfgMgr.getCachePath(), mNewGame, mEncoding, mFallbackMap));
//Load translation data //Load translation data
std::unique_ptr<TranslationData::Storage> translationDataStorage(new TranslationData::Storage(mEncoding)); std::auto_ptr<TranslationData::Storage> translationDataStorage(new TranslationData::Storage(mEncoding));
translationDataStorage->loadTranslationData(mFileCollections, mMaster); translationDataStorage->loadTranslationData(mFileCollections, mMaster);
// Create window manager - this manages all the MW-specific GUI windows // Create window manager - this manages all the MW-specific GUI windows

@ -14,7 +14,7 @@
#include <string> #include <string>
#include <components/esm/loadclas.hpp> #include <components/esm/loadclas.hpp>
#include <components/translation_data/translation_data.hpp> #include <components/translation/translation.hpp>
#include "../mwbase/windowmanager.hpp" #include "../mwbase/windowmanager.hpp"
@ -252,7 +252,7 @@ namespace MWGui
SpellCreationDialog* mSpellCreationDialog; SpellCreationDialog* mSpellCreationDialog;
EnchantingDialog* mEnchantingDialog; EnchantingDialog* mEnchantingDialog;
TrainingWindow* mTrainingWindow; TrainingWindow* mTrainingWindow;
std::unique_ptr<TranslationData::Storage> mTranslationDataStorage; std::auto_ptr<TranslationData::Storage> mTranslationDataStorage;
CharacterCreation* mCharGen; CharacterCreation* mCharGen;

@ -62,8 +62,8 @@ add_component_dir (interpreter
miscopcodes opcodes runtime scriptopcodes spatialopcodes types miscopcodes opcodes runtime scriptopcodes spatialopcodes types
) )
add_component_dir (translation_data add_component_dir (translation
translation_data translation
) )
include_directories(${BULLET_INCLUDE_DIRS}) include_directories(${BULLET_INCLUDE_DIRS})

@ -1,4 +1,4 @@
#include "translation_data.hpp" #include "translation.hpp"
#include <components/misc/stringops.hpp> #include <components/misc/stringops.hpp>
#include <fstream> #include <fstream>
@ -74,7 +74,8 @@ namespace TranslationData
std::string Storage::translateCellName(const std::string& cellName) const std::string Storage::translateCellName(const std::string& cellName) const
{ {
auto entry = mCellNamesTranslations.find(cellName); std::map<std::string, std::string>::const_iterator entry =
mCellNamesTranslations.find(cellName);
if (entry == mCellNamesTranslations.end()) if (entry == mCellNamesTranslations.end())
return cellName; return cellName;
@ -87,7 +88,9 @@ namespace TranslationData
std::string result; std::string result;
//seeking for the standard phrase form //seeking for the standard phrase form
auto phraseFormsIterator = mPhraseForms.find(phrase); std::map<std::string, std::string>::const_iterator phraseFormsIterator =
mPhraseForms.find(phrase);
if (phraseFormsIterator != mPhraseForms.end()) if (phraseFormsIterator != mPhraseForms.end())
result = phraseFormsIterator->second; result = phraseFormsIterator->second;
else else
@ -95,7 +98,9 @@ namespace TranslationData
//seeking for the topic ID //seeking for the topic ID
auto topicIDIterator = mTopicIDs.find(result); std::map<std::string, std::string>::const_iterator topicIDIterator =
mTopicIDs.find(result);
if (topicIDIterator != mTopicIDs.end()) if (topicIDIterator != mTopicIDs.end())
result = topicIDIterator->second; result = topicIDIterator->second;
Loading…
Cancel
Save