mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
5c504e4d22
- Morrowind load over 300,000 references, so even small inefficiencies add up to longer loading times. - std::map is used, but should try others, std::unordered_map or even std::vector (copied the changes from commit SHA-1: 86945d19128468ad987b5bf4332602d613d25d9f)
15 lines
308 B
C++
15 lines
308 B
C++
#include "ref.hpp"
|
|
|
|
#include "cellcoordinates.hpp"
|
|
|
|
CSMWorld::CellRef::CellRef() : mNew (true), mIdNum(0)
|
|
{
|
|
mRefNum.mIndex = 0;
|
|
mRefNum.mContentFile = 0;
|
|
}
|
|
|
|
std::pair<int, int> CSMWorld::CellRef::getCellIndex() const
|
|
{
|
|
return CellCoordinates::coordinatesToCellIndex (mPos.pos[0], mPos.pos[1]);
|
|
}
|