mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Change mWnam type to std::array
This commit is contained in:
parent
0cb37742cb
commit
6f3b7072ac
@ -94,7 +94,7 @@ namespace ESM
|
||||
mDataTypes |= DATA_VHGT;
|
||||
break;
|
||||
case fourCC("WNAM"):
|
||||
esm.getHExact(mWnam, sizeof(mWnam));
|
||||
esm.getHExact(mWnam.data(), mWnam.size());
|
||||
mDataTypes |= DATA_WNAM;
|
||||
break;
|
||||
case fourCC("VCLR"):
|
||||
@ -325,9 +325,9 @@ namespace ESM
|
||||
, mY(land.mY)
|
||||
, mContext(land.mContext)
|
||||
, mDataTypes(land.mDataTypes)
|
||||
, mWnam(land.mWnam)
|
||||
, mLandData(land.mLandData != nullptr ? std::make_unique<LandData>(*land.mLandData) : nullptr)
|
||||
{
|
||||
std::copy(land.mWnam, land.mWnam + LAND_GLOBAL_MAP_LOD_SIZE, mWnam);
|
||||
}
|
||||
|
||||
Land& Land::operator=(const Land& land)
|
||||
|
@ -1,6 +1,7 @@
|
||||
#ifndef OPENMW_ESM_LAND_H
|
||||
#define OPENMW_ESM_LAND_H
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
@ -125,7 +126,7 @@ namespace ESM
|
||||
};
|
||||
|
||||
// low-LOD heightmap (used for rendering the global map)
|
||||
std::int8_t mWnam[LAND_GLOBAL_MAP_LOD_SIZE];
|
||||
std::array<std::int8_t, LAND_GLOBAL_MAP_LOD_SIZE> mWnam;
|
||||
|
||||
void load(ESMReader& esm, bool& isDeleted);
|
||||
void save(ESMWriter& esm, bool isDeleted = false) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user