diff --git a/components/esm3/esmwriter.hpp b/components/esm3/esmwriter.hpp index ed2ccbb377..3073daf15e 100644 --- a/components/esm3/esmwriter.hpp +++ b/components/esm3/esmwriter.hpp @@ -3,6 +3,7 @@ #include #include +#include #include "components/esm/esmcommon.hpp" #include "loadtes3.hpp" @@ -111,6 +112,7 @@ class ESMWriter template void writeT(const T& data) { + static_assert(!std::is_pointer_v); write((char*)&data, sizeof(T)); } @@ -123,6 +125,7 @@ class ESMWriter template void writeT(const T& data, size_t size) { + static_assert(!std::is_pointer_v); write((char*)&data, size); }