mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +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)
27 lines
569 B
C++
27 lines
569 B
C++
#ifndef CSM_WOLRD_REF_H
|
|
#define CSM_WOLRD_REF_H
|
|
|
|
#include <utility>
|
|
|
|
#include <components/esm/cellref.hpp>
|
|
|
|
namespace CSMWorld
|
|
{
|
|
/// \brief Wrapper for CellRef sub record
|
|
struct CellRef : public ESM::CellRef
|
|
{
|
|
std::string mId;
|
|
std::string mCell;
|
|
std::string mOriginalCell;
|
|
bool mNew; // new reference, not counted yet, ref num not assigned yet
|
|
unsigned int mIdNum;
|
|
|
|
CellRef();
|
|
|
|
/// Calculate cell index based on coordinates (x and y)
|
|
std::pair<int, int> getCellIndex() const;
|
|
};
|
|
}
|
|
|
|
#endif
|