1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-05-22 22:11:32 +00:00

fixed a constness problem

This commit is contained in:
Marc Zinnschlag 2011-04-21 10:49:45 +02:00
parent 23464e4035
commit 717b5e1784
9 changed files with 24 additions and 24 deletions

View file

@ -119,7 +119,7 @@ void BirthDialog::updateBirths()
{ {
birthList->removeAllItems(); birthList->removeAllItems();
ESMS::ESMStore &store = mWindowManager.getStore(); const ESMS::ESMStore &store = mWindowManager.getStore();
ESMS::RecListT<ESM::BirthSign>::MapType::const_iterator it = store.birthSigns.list.begin(); ESMS::RecListT<ESM::BirthSign>::MapType::const_iterator it = store.birthSigns.list.begin();
ESMS::RecListT<ESM::BirthSign>::MapType::const_iterator end = store.birthSigns.list.end(); ESMS::RecListT<ESM::BirthSign>::MapType::const_iterator end = store.birthSigns.list.end();
@ -149,7 +149,7 @@ void BirthDialog::updateSpells()
const int lineHeight = 18; const int lineHeight = 18;
MyGUI::IntCoord coord(0, 0, spellArea->getWidth(), 18); MyGUI::IntCoord coord(0, 0, spellArea->getWidth(), 18);
ESMS::ESMStore &store = mWindowManager.getStore(); const ESMS::ESMStore &store = mWindowManager.getStore();
const ESM::BirthSign *birth = store.birthSigns.find(currentBirthId); const ESM::BirthSign *birth = store.birthSigns.find(currentBirthId);
std::string texturePath = std::string("textures\\") + birth->texture; std::string texturePath = std::string("textures\\") + birth->texture;

View file

@ -50,7 +50,7 @@ void GenerateClassResultDialog::setClassId(const std::string &classId)
{ {
currentClassId = classId; currentClassId = classId;
classImage->setImageTexture(std::string("textures\\levelup\\") + currentClassId + ".dds"); classImage->setImageTexture(std::string("textures\\levelup\\") + currentClassId + ".dds");
ESMS::ESMStore &store = mWindowManager.getStore(); const ESMS::ESMStore &store = mWindowManager.getStore();
className->setCaption(store.classes.find(currentClassId)->name); className->setCaption(store.classes.find(currentClassId)->name);
} }
@ -196,7 +196,7 @@ void PickClassDialog::updateClasses()
{ {
classList->removeAllItems(); classList->removeAllItems();
ESMS::ESMStore &store = mWindowManager.getStore(); const ESMS::ESMStore &store = mWindowManager.getStore();
ESMS::RecListT<ESM::Class>::MapType::const_iterator it = store.classes.list.begin(); ESMS::RecListT<ESM::Class>::MapType::const_iterator it = store.classes.list.begin();
ESMS::RecListT<ESM::Class>::MapType::const_iterator end = store.classes.list.end(); ESMS::RecListT<ESM::Class>::MapType::const_iterator end = store.classes.list.end();
@ -220,7 +220,7 @@ void PickClassDialog::updateStats()
{ {
if (currentClassId.empty()) if (currentClassId.empty())
return; return;
ESMS::ESMStore &store = mWindowManager.getStore(); const ESMS::ESMStore &store = mWindowManager.getStore();
const ESM::Class *klass = store.classes.search(currentClassId); const ESM::Class *klass = store.classes.search(currentClassId);
if (!klass) if (!klass)
return; return;

View file

@ -212,7 +212,7 @@ void RaceDialog::updateRaces()
{ {
raceList->removeAllItems(); raceList->removeAllItems();
ESMS::ESMStore &store = mWindowManager.getStore(); const ESMS::ESMStore &store = mWindowManager.getStore();
ESMS::RecListT<ESM::Race>::MapType::const_iterator it = store.races.list.begin(); ESMS::RecListT<ESM::Race>::MapType::const_iterator it = store.races.list.begin();
ESMS::RecListT<ESM::Race>::MapType::const_iterator end = store.races.list.end(); ESMS::RecListT<ESM::Race>::MapType::const_iterator end = store.races.list.end();
@ -246,7 +246,7 @@ void RaceDialog::updateSkills()
const int lineHeight = 18; const int lineHeight = 18;
MyGUI::IntCoord coord1(0, 0, skillList->getWidth(), 18); MyGUI::IntCoord coord1(0, 0, skillList->getWidth(), 18);
ESMS::ESMStore &store = mWindowManager.getStore(); const ESMS::ESMStore &store = mWindowManager.getStore();
const ESM::Race *race = store.races.find(currentRaceId); const ESM::Race *race = store.races.find(currentRaceId);
int count = sizeof(race->data.bonus)/sizeof(race->data.bonus[0]); // TODO: Find a portable macro for this ARRAYSIZE? int count = sizeof(race->data.bonus)/sizeof(race->data.bonus[0]); // TODO: Find a portable macro for this ARRAYSIZE?
for (int i = 0; i < count; ++i) for (int i = 0; i < count; ++i)
@ -282,7 +282,7 @@ void RaceDialog::updateSpellPowers()
const int lineHeight = 18; const int lineHeight = 18;
MyGUI::IntCoord coord(0, 0, spellPowerList->getWidth(), 18); MyGUI::IntCoord coord(0, 0, spellPowerList->getWidth(), 18);
ESMS::ESMStore &store = mWindowManager.getStore(); const ESMS::ESMStore &store = mWindowManager.getStore();
const ESM::Race *race = store.races.find(currentRaceId); const ESM::Race *race = store.races.find(currentRaceId);
std::vector<std::string>::const_iterator it = race->powers.list.begin(); std::vector<std::string>::const_iterator it = race->powers.list.begin();

View file

@ -323,7 +323,7 @@ void StatsWindow::updateSkillArea()
if (!miscSkills.empty()) if (!miscSkills.empty())
addSkills(miscSkills, "sSkillClassMisc", "Misc Skills", coord1, coord2); addSkills(miscSkills, "sSkillClassMisc", "Misc Skills", coord1, coord2);
ESMS::ESMStore &store = mWindowManager.getStore(); const ESMS::ESMStore &store = mWindowManager.getStore();
if (!factions.empty()) if (!factions.empty())
{ {

View file

@ -278,7 +278,7 @@ void MWSpell::setSpellId(const std::string &spellId)
void MWSpell::createEffectWidgets(std::vector<MyGUI::WidgetPtr> &effects, MyGUI::WidgetPtr creator, MyGUI::IntCoord &coord) void MWSpell::createEffectWidgets(std::vector<MyGUI::WidgetPtr> &effects, MyGUI::WidgetPtr creator, MyGUI::IntCoord &coord)
{ {
ESMS::ESMStore &store = mWindowManager->getStore(); const ESMS::ESMStore &store = mWindowManager->getStore();
const ESM::Spell *spell = store.spells.search(id); const ESM::Spell *spell = store.spells.search(id);
MYGUI_ASSERT(spell, "spell with id '" << id << "' not found"); MYGUI_ASSERT(spell, "spell with id '" << id << "' not found");
@ -298,7 +298,7 @@ void MWSpell::updateWidgets()
{ {
if (spellNameWidget && mWindowManager) if (spellNameWidget && mWindowManager)
{ {
ESMS::ESMStore &store = mWindowManager->getStore(); const ESMS::ESMStore &store = mWindowManager->getStore();
const ESM::Spell *spell = store.spells.search(id); const ESM::Spell *spell = store.spells.search(id);
if (spell) if (spell)
spellNameWidget->setCaption(spell->name); spellNameWidget->setCaption(spell->name);
@ -363,7 +363,7 @@ void MWSpellEffect::updateWidgets()
if (!mWindowManager) if (!mWindowManager)
return; return;
ESMS::ESMStore &store = mWindowManager->getStore(); const ESMS::ESMStore &store = mWindowManager->getStore();
const ESM::MagicEffect *magicEffect = store.magicEffects.search(effect.effectID); const ESM::MagicEffect *magicEffect = store.magicEffects.search(effect.effectID);
if (textWidget) if (textWidget)
{ {

View file

@ -940,7 +940,7 @@ void WindowManager::onReviewActivateDialog(int parDialog)
}; };
} }
ESMS::ESMStore& WindowManager::getStore() const ESMS::ESMStore& WindowManager::getStore() const
{ {
return environment.mWorld->getStore(); return environment.mWorld->getStore();
} }

View file

@ -257,7 +257,7 @@ namespace MWGui
*/ */
const std::string &getGameSettingString(const std::string &id, const std::string &default_); const std::string &getGameSettingString(const std::string &id, const std::string &default_);
ESMS::ESMStore& getStore(); const ESMS::ESMStore& getStore() const;
private: private:

View file

@ -460,7 +460,7 @@ namespace MWWorld
return *mPlayer; return *mPlayer;
} }
ESMS::ESMStore& World::getStore() const ESMS::ESMStore& World::getStore() const
{ {
return mStore; return mStore;
} }

View file

@ -115,7 +115,7 @@ namespace MWWorld
MWWorld::Player& getPlayer(); MWWorld::Player& getPlayer();
ESMS::ESMStore& getStore(); const ESMS::ESMStore& getStore() const;
const ScriptList& getLocalScripts() const; const ScriptList& getLocalScripts() const;
///< Names and local variable state of all local scripts in active cells. ///< Names and local variable state of all local scripts in active cells.