mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-22 00:53:52 +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: 86945d1912
)
14 lines
308 B
C++
14 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]);
|
|
}
|