From 4571a8b88a224a5519870cb4e5c448c8fd503921 Mon Sep 17 00:00:00 2001 From: elsid Date: Mon, 17 Jun 2024 21:46:40 +0200 Subject: [PATCH] Remove unused SCHD type --- apps/essimporter/importscpt.hpp | 2 +- components/esm3/loadscpt.cpp | 2 +- components/esm3/loadscpt.hpp | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/essimporter/importscpt.hpp b/apps/essimporter/importscpt.hpp index af383b674c..fe936af439 100644 --- a/apps/essimporter/importscpt.hpp +++ b/apps/essimporter/importscpt.hpp @@ -19,7 +19,7 @@ namespace ESSImport struct SCHD { ESM::NAME32 mName; - ESM::Script::SCHDstruct mData; + ESM::Script::SCHD mData; }; // A running global script diff --git a/components/esm3/loadscpt.cpp b/components/esm3/loadscpt.cpp index ae56a7b4f4..9339233116 100644 --- a/components/esm3/loadscpt.cpp +++ b/components/esm3/loadscpt.cpp @@ -11,7 +11,7 @@ namespace ESM { - template T> + template T> void decompose(T&& v, const auto& f) { f(v.mNumShorts, v.mNumLongs, v.mNumFloats, v.mScriptDataSize, v.mStringTableSize); diff --git a/components/esm3/loadscpt.hpp b/components/esm3/loadscpt.hpp index 61b27f1423..50f2463ce2 100644 --- a/components/esm3/loadscpt.hpp +++ b/components/esm3/loadscpt.hpp @@ -1,11 +1,12 @@ #ifndef OPENMW_ESM_SCPT_H #define OPENMW_ESM_SCPT_H +#include #include #include -#include "components/esm/defs.hpp" -#include "components/esm/refid.hpp" +#include +#include namespace ESM { @@ -25,22 +26,21 @@ namespace ESM /// Return a string descriptor for this record type. Currently used for debugging / error logs only. static std::string_view getRecordType() { return "Script"; } - struct SCHDstruct + struct SCHD { /// Data from script-precompling in the editor. /// \warning Do not use them. OpenCS currently does not precompile scripts. - uint32_t mNumShorts, mNumLongs, mNumFloats, mScriptDataSize, mStringTableSize; - }; - struct SCHD - { - std::string mName; - Script::SCHDstruct mData; + std::uint32_t mNumShorts; + std::uint32_t mNumLongs; + std::uint32_t mNumFloats; + std::uint32_t mScriptDataSize; + std::uint32_t mStringTableSize; }; uint32_t mRecordFlags; RefId mId; - SCHDstruct mData; + SCHD mData; /// Variable names generated by script-precompiling in the editor. /// \warning Do not use this field. OpenCS currently does not precompile scripts.