From ddb4670354a5f29e6ebd08f625edb2576de700e6 Mon Sep 17 00:00:00 2001 From: Jan Date: Tue, 25 Jul 2023 16:31:02 +0200 Subject: Remove Vector3 Constructor (#494) - Packing was enabled because the compiler may add padding which we don't want. - Constructors were removed because they were either rather primitive or broken (the `pRawFloats` one). - Use of constructor was replaced with a simple cast, which works just as well. --- NorthstarDLL/scripts/scriptdatatables.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'NorthstarDLL/scripts') diff --git a/NorthstarDLL/scripts/scriptdatatables.cpp b/NorthstarDLL/scripts/scriptdatatables.cpp index 8aa52fdb..532624f3 100644 --- a/NorthstarDLL/scripts/scriptdatatables.cpp +++ b/NorthstarDLL/scripts/scriptdatatables.cpp @@ -765,8 +765,8 @@ std::string DataTableToString(Datatable* datatable) case DatatableType::VECTOR: { - Vector3 pVector((float*)pUntypedVal); - sCSVString += fmt::format("<{},{},{}>", pVector.x, pVector.y, pVector.z); + Vector3* pVector = (Vector3*)(pUntypedVal); + sCSVString += fmt::format("<{},{},{}>", pVector->x, pVector->y, pVector->z); break; } -- cgit v1.2.3