From 99885e8ca411ff4e06fd8c77c64fda722301610f Mon Sep 17 00:00:00 2001 From: gugus Date: Sun, 2 Sep 2012 18:04:36 +0200 Subject: [PATCH] Revert "fix a bug with case sensitivity: when searching for a cell which is already loaded,but with another case, the cell get loaded twice, which is bad :p" This reverts commit 165065d37891be204f67f9cc89de3780a0982b92. --- apps/openmw/mwworld/cells.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/apps/openmw/mwworld/cells.cpp b/apps/openmw/mwworld/cells.cpp index dd2339eeb..822aa78d6 100644 --- a/apps/openmw/mwworld/cells.cpp +++ b/apps/openmw/mwworld/cells.cpp @@ -8,17 +8,6 @@ #include "class.hpp" #include "containerstore.hpp" -//helper function -std::string toLower (const std::string& name) -{ - std::string lowerCase; - - std::transform (name.begin(), name.end(), std::back_inserter (lowerCase), - (int(*)(int)) std::tolower); - - return lowerCase; -} - MWWorld::Ptr::CellStore *MWWorld::Cells::getCellStore (const ESM::Cell *cell) { if (cell->data.flags & ESM::Cell::Interior) @@ -140,14 +129,13 @@ MWWorld::Ptr::CellStore *MWWorld::Cells::getExterior (int x, int y) MWWorld::Ptr::CellStore *MWWorld::Cells::getInterior (const std::string& name) { - std::string nName = toLower(name); - std::map::iterator result = mInteriors.find (nName); + std::map::iterator result = mInteriors.find (name); if (result==mInteriors.end()) { - const ESM::Cell *cell = mStore.cells.findInt (nName); + const ESM::Cell *cell = mStore.cells.findInt (name); - result = mInteriors.insert (std::make_pair (nName, Ptr::CellStore (cell))).first; + result = mInteriors.insert (std::make_pair (name, Ptr::CellStore (cell))).first; } if (result->second.mState!=Ptr::CellStore::State_Loaded)