1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 12:42:11 +00:00
OpenMW/components/esm/esm3exteriorcellrefid.cpp
florent.teppe d782d37ee2 Make sure Vec2iRefId is trivially copyable on GCC 11.3
std::pair<int, int> isn't trivially copyable on some compilers
so a specific struct is defined, it's an int pair, but it should be recognised by GCC 11.3 as trivially copyable

Vec2iRefId => ESM3ExteriorCellRefId

more explcit name and use mX,mY instead of pair
renamed files and enum
2023-04-03 14:17:31 +02:00

27 lines
600 B
C++

#include "esm3exteriorcellrefid.hpp"
#include <ostream>
#include <sstream>
namespace ESM
{
std::string ESM3ExteriorCellRefId::toString() const
{
std::ostringstream stream;
stream << "# " << mY << ", " << mY;
return stream.str();
}
std::string ESM3ExteriorCellRefId::toDebugString() const
{
std::ostringstream stream;
stream << *this;
return stream.str();
}
std::ostream& operator<<(std::ostream& stream, ESM3ExteriorCellRefId value)
{
return stream << "Vec2i{" << value.mX << "," << value.mY << '}';
}
}