1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-10-16 14:16:33 +00:00

Use the proper types

This commit is contained in:
jvoisin 2022-06-04 16:34:23 +02:00
parent 6c71071083
commit df0cd86cf4
46 changed files with 44 additions and 46 deletions

View file

@ -12,7 +12,7 @@ namespace ESM
struct DebugProfile struct DebugProfile
{ {
constexpr static unsigned int sRecordId = REC_DBGP; constexpr static RecNameInts sRecordId = REC_DBGP;
enum Flags enum Flags

View file

@ -11,7 +11,7 @@ namespace ESM
struct Filter struct Filter
{ {
constexpr static unsigned int sRecordId = REC_FILT; constexpr static RecNameInts sRecordId = REC_FILT;
unsigned int mRecordFlags; unsigned int mRecordFlags;

View file

@ -16,7 +16,7 @@ namespace ESM
///< \brief An image containing the explored areas on the global map. ///< \brief An image containing the explored areas on the global map.
struct GlobalMap struct GlobalMap
{ {
constexpr static unsigned int sRecordId = REC_GMAP; constexpr static RecNameInts sRecordId = REC_GMAP;
// The minimum and maximum cell coordinates // The minimum and maximum cell coordinates

View file

@ -2,7 +2,6 @@
#include "esmreader.hpp" #include "esmreader.hpp"
#include "esmwriter.hpp" #include "esmwriter.hpp"
#include "components/esm/defs.hpp"
namespace ESM namespace ESM
{ {

View file

@ -12,7 +12,7 @@ class ESMWriter;
struct Activator struct Activator
{ {
constexpr static unsigned int sRecordId = REC_ACTI; constexpr static RecNameInts sRecordId = REC_ACTI;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Activator"; } static std::string_view getRecordType() { return "Activator"; }

View file

@ -18,7 +18,7 @@ class ESMWriter;
struct Potion struct Potion
{ {
constexpr static unsigned int sRecordId = REC_ALCH; constexpr static RecNameInts sRecordId = REC_ALCH;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.

View file

@ -17,7 +17,7 @@ class ESMWriter;
struct Apparatus struct Apparatus
{ {
constexpr static unsigned int sRecordId = REC_APPA; constexpr static RecNameInts sRecordId = REC_APPA;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Apparatus"; } static std::string_view getRecordType() { return "Apparatus"; }

View file

@ -2,7 +2,6 @@
#include "esmreader.hpp" #include "esmreader.hpp"
#include "esmwriter.hpp" #include "esmwriter.hpp"
#include "components/esm/defs.hpp"
namespace ESM namespace ESM
{ {

View file

@ -67,7 +67,7 @@ struct PartReferenceList
struct Armor struct Armor
{ {
constexpr static unsigned int sRecordId = REC_ARMO; constexpr static RecNameInts sRecordId = REC_ARMO;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Armor"; } static std::string_view getRecordType() { return "Armor"; }

View file

@ -12,7 +12,7 @@ class ESMWriter;
struct BodyPart struct BodyPart
{ {
constexpr static unsigned int sRecordId = REC_BODY; constexpr static RecNameInts sRecordId = REC_BODY;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "BodyPart"; } static std::string_view getRecordType() { return "BodyPart"; }

View file

@ -15,7 +15,7 @@ class ESMWriter;
struct Book struct Book
{ {
constexpr static unsigned int sRecordId = REC_BOOK; constexpr static RecNameInts sRecordId = REC_BOOK;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Book"; } static std::string_view getRecordType() { return "Book"; }

View file

@ -14,7 +14,7 @@ class ESMWriter;
struct BirthSign struct BirthSign
{ {
constexpr static unsigned int sRecordId = REC_BSGN; constexpr static RecNameInts sRecordId = REC_BSGN;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "BirthSign"; } static std::string_view getRecordType() { return "BirthSign"; }

View file

@ -63,7 +63,7 @@ struct CellRefTrackerPredicate
*/ */
struct Cell struct Cell
{ {
constexpr static unsigned int sRecordId = REC_CELL; constexpr static RecNameInts sRecordId = REC_CELL;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Cell"; } static std::string_view getRecordType() { return "Cell"; }

View file

@ -19,7 +19,7 @@ class ESMWriter;
// class // class
struct Class struct Class
{ {
constexpr static unsigned int sRecordId = REC_CLAS; constexpr static RecNameInts sRecordId = REC_CLAS;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Class"; } static std::string_view getRecordType() { return "Class"; }

View file

@ -18,7 +18,7 @@ class ESMWriter;
struct Clothing struct Clothing
{ {
constexpr static unsigned int sRecordId = REC_CLOT; constexpr static RecNameInts sRecordId = REC_CLOT;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Clothing"; } static std::string_view getRecordType() { return "Clothing"; }

View file

@ -36,7 +36,7 @@ struct InventoryList
struct Container struct Container
{ {
constexpr static unsigned int sRecordId = REC_CONT; constexpr static RecNameInts sRecordId = REC_CONT;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Container"; } static std::string_view getRecordType() { return "Container"; }

View file

@ -23,7 +23,7 @@ class ESMWriter;
struct Creature struct Creature
{ {
constexpr static unsigned int sRecordId = REC_CREA; constexpr static RecNameInts sRecordId = REC_CREA;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Creature"; } static std::string_view getRecordType() { return "Creature"; }

View file

@ -21,7 +21,7 @@ class ESMWriter;
struct Dialogue struct Dialogue
{ {
constexpr static unsigned int sRecordId = REC_DIAL; constexpr static RecNameInts sRecordId = REC_DIAL;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Dialogue"; } static std::string_view getRecordType() { return "Dialogue"; }

View file

@ -13,7 +13,7 @@ class ESMWriter;
struct Door struct Door
{ {
constexpr static unsigned int sRecordId = REC_DOOR; constexpr static RecNameInts sRecordId = REC_DOOR;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Door"; } static std::string_view getRecordType() { return "Door"; }

View file

@ -18,7 +18,7 @@ class ESMWriter;
struct Enchantment struct Enchantment
{ {
constexpr static unsigned int sRecordId = REC_ENCH; constexpr static RecNameInts sRecordId = REC_ENCH;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Enchantment"; } static std::string_view getRecordType() { return "Enchantment"; }

View file

@ -32,7 +32,7 @@ struct RankData
struct Faction struct Faction
{ {
constexpr static unsigned int sRecordId = REC_FACT; constexpr static RecNameInts sRecordId = REC_FACT;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Faction"; } static std::string_view getRecordType() { return "Faction"; }

View file

@ -19,7 +19,7 @@ class ESMWriter;
struct Global struct Global
{ {
constexpr static unsigned int sRecordId = REC_GLOB; constexpr static RecNameInts sRecordId = REC_GLOB;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Global"; } static std::string_view getRecordType() { return "Global"; }

View file

@ -20,7 +20,7 @@ class ESMWriter;
struct GameSetting struct GameSetting
{ {
constexpr static unsigned int sRecordId = REC_GMST; constexpr static RecNameInts sRecordId = REC_GMST;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "GameSetting"; } static std::string_view getRecordType() { return "GameSetting"; }

View file

@ -20,7 +20,7 @@ class ESMWriter;
struct DialInfo struct DialInfo
{ {
constexpr static unsigned int sRecordId = REC_INFO; constexpr static RecNameInts sRecordId = REC_INFO;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "DialInfo"; } static std::string_view getRecordType() { return "DialInfo"; }

View file

@ -17,7 +17,7 @@ class ESMWriter;
struct Ingredient struct Ingredient
{ {
constexpr static unsigned int sRecordId = REC_INGR; constexpr static RecNameInts sRecordId = REC_INGR;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Ingredient"; } static std::string_view getRecordType() { return "Ingredient"; }

View file

@ -20,7 +20,7 @@ class ESMWriter;
struct Land struct Land
{ {
constexpr static unsigned int sRecordId = REC_LAND; constexpr static RecNameInts sRecordId = REC_LAND;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Land"; } static std::string_view getRecordType() { return "Land"; }

View file

@ -18,7 +18,7 @@ class ESMWriter;
struct Light struct Light
{ {
constexpr static unsigned int sRecordId = REC_LIGH; constexpr static RecNameInts sRecordId = REC_LIGH;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Light"; } static std::string_view getRecordType() { return "Light"; }

View file

@ -13,7 +13,7 @@ class ESMWriter;
struct Lockpick struct Lockpick
{ {
constexpr static unsigned int sRecordId = REC_LOCK; constexpr static RecNameInts sRecordId = REC_LOCK;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Lockpick"; } static std::string_view getRecordType() { return "Lockpick"; }

View file

@ -20,7 +20,7 @@ class ESMWriter;
struct LandTexture struct LandTexture
{ {
constexpr static unsigned int sRecordId = REC_LTEX; constexpr static RecNameInts sRecordId = REC_LTEX;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "LandTexture"; } static std::string_view getRecordType() { return "LandTexture"; }

View file

@ -15,7 +15,7 @@ class ESMWriter;
struct MagicEffect struct MagicEffect
{ {
constexpr static unsigned int sRecordId = REC_MGEF; constexpr static RecNameInts sRecordId = REC_MGEF;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "MagicEffect"; } static std::string_view getRecordType() { return "MagicEffect"; }

View file

@ -18,7 +18,7 @@ class ESMWriter;
struct Miscellaneous struct Miscellaneous
{ {
constexpr static unsigned int sRecordId = REC_MISC; constexpr static RecNameInts sRecordId = REC_MISC;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Miscellaneous"; } static std::string_view getRecordType() { return "Miscellaneous"; }

View file

@ -23,7 +23,7 @@ class ESMWriter;
struct NPC struct NPC
{ {
constexpr static unsigned int sRecordId = REC_NPC_; constexpr static RecNameInts sRecordId = REC_NPC_;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "NPC"; } static std::string_view getRecordType() { return "NPC"; }

View file

@ -17,7 +17,7 @@ class ESMWriter;
*/ */
struct Pathgrid struct Pathgrid
{ {
constexpr static unsigned int sRecordId = REC_PGRD; constexpr static RecNameInts sRecordId = REC_PGRD;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Pathgrid"; } static std::string_view getRecordType() { return "Pathgrid"; }

View file

@ -13,7 +13,7 @@ class ESMWriter;
struct Probe struct Probe
{ {
constexpr static unsigned int sRecordId = REC_PROB; constexpr static RecNameInts sRecordId = REC_PROB;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Probe"; } static std::string_view getRecordType() { return "Probe"; }

View file

@ -18,7 +18,7 @@ class ESMWriter;
struct Race struct Race
{ {
constexpr static unsigned int sRecordId = REC_RACE; constexpr static RecNameInts sRecordId = REC_RACE;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Race"; } static std::string_view getRecordType() { return "Race"; }

View file

@ -19,7 +19,7 @@ class ESMWriter;
struct Region struct Region
{ {
constexpr static unsigned int sRecordId = REC_REGN; constexpr static RecNameInts sRecordId = REC_REGN;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Region"; } static std::string_view getRecordType() { return "Region"; }

View file

@ -13,7 +13,7 @@ class ESMWriter;
struct Repair struct Repair
{ {
constexpr static unsigned int sRecordId = REC_REPA; constexpr static RecNameInts sRecordId = REC_REPA;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Repair"; } static std::string_view getRecordType() { return "Repair"; }

View file

@ -20,7 +20,7 @@ class ESMWriter;
class Script class Script
{ {
public: public:
constexpr static unsigned int sRecordId = REC_SCPT; constexpr static RecNameInts sRecordId = REC_SCPT;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Script"; } static std::string_view getRecordType() { return "Script"; }

View file

@ -20,7 +20,7 @@ class ESMWriter;
struct Skill struct Skill
{ {
constexpr static unsigned int sRecordId = REC_SKIL; constexpr static RecNameInts sRecordId = REC_SKIL;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Skill"; } static std::string_view getRecordType() { return "Skill"; }

View file

@ -17,7 +17,7 @@ class ESMWriter;
struct SoundGenerator struct SoundGenerator
{ {
constexpr static unsigned int sRecordId = REC_SNDG; constexpr static RecNameInts sRecordId = REC_SNDG;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "SoundGenerator"; } static std::string_view getRecordType() { return "SoundGenerator"; }

View file

@ -18,7 +18,7 @@ struct SOUNstruct
struct Sound struct Sound
{ {
constexpr static unsigned int sRecordId = REC_SOUN; constexpr static RecNameInts sRecordId = REC_SOUN;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Sound"; } static std::string_view getRecordType() { return "Sound"; }

View file

@ -14,7 +14,7 @@ class ESMWriter;
struct Spell struct Spell
{ {
constexpr static unsigned int sRecordId = REC_SPEL; constexpr static RecNameInts sRecordId = REC_SPEL;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Spell"; } static std::string_view getRecordType() { return "Spell"; }

View file

@ -21,7 +21,7 @@ class ESMWriter;
struct StartScript struct StartScript
{ {
constexpr static unsigned int sRecordId = REC_SSCR; constexpr static RecNameInts sRecordId = REC_SSCR;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "StartScript"; } static std::string_view getRecordType() { return "StartScript"; }

View file

@ -25,7 +25,7 @@ class ESMWriter;
struct Static struct Static
{ {
constexpr static unsigned int sRecordId = REC_STAT; constexpr static RecNameInts sRecordId = REC_STAT;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Static"; } static std::string_view getRecordType() { return "Static"; }

View file

@ -17,7 +17,7 @@ class ESMWriter;
struct Weapon struct Weapon
{ {
constexpr static unsigned int sRecordId = REC_WEAP; constexpr static RecNameInts sRecordId = REC_WEAP;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Weapon"; } static std::string_view getRecordType() { return "Weapon"; }

View file

@ -15,7 +15,7 @@ namespace ESM
struct SavedGame struct SavedGame
{ {
constexpr static unsigned int sRecordId = REC_SAVE; constexpr static RecNameInts sRecordId = REC_SAVE;
static int sCurrentFormat; static int sCurrentFormat;