1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-10-15 15:26:38 +00:00
openmw/components/esm3/containerstate.hpp
elsid dea69b229c
Remove small translation units
Remove .cpp files with small amount of code which don't have additional
includes compared to corresponding .hpp files. This reduces the total
size of preprocessed code of the project and should reduce compilation
time.
2025-08-29 00:41:47 +02:00

34 lines
761 B
C++

#ifndef OPENMW_ESM_CONTAINERSTATE_H
#define OPENMW_ESM_CONTAINERSTATE_H
#include "inventorystate.hpp"
#include "objectstate.hpp"
namespace ESM
{
// format 0, saved games only
struct ContainerState final : public ObjectState
{
InventoryState mInventory;
void load(ESMReader& esm) override
{
ObjectState::load(esm);
mInventory.load(esm);
}
void save(ESMWriter& esm, bool inInventory = false) const override
{
ObjectState::save(esm, inInventory);
mInventory.save(esm);
}
ContainerState& asContainerState() override { return *this; }
const ContainerState& asContainerState() const override { return *this; }
};
}
#endif