mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-09-27 16:20:45 +00:00
refactor: unglob std::wstring
This commit is contained in:
@@ -18,7 +18,7 @@ public:
|
||||
uint8_t value_byte;
|
||||
int value_int;
|
||||
short value_short;
|
||||
wstring value_wstring;
|
||||
std::wstring value_wstring;
|
||||
std::shared_ptr<ItemInstance> value_itemInstance;
|
||||
bool dirty;
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
// There was one type here that took a generic Object type, using overloading here instead
|
||||
DataItem(int type, int id, uint8_t value);
|
||||
DataItem(int type, int id, int value);
|
||||
DataItem(int type, int id, const wstring& value);
|
||||
DataItem(int type, int id, const std::wstring& value);
|
||||
DataItem(int type, int id, std::shared_ptr<ItemInstance> itemInstance);
|
||||
DataItem(int type, int id, short value);
|
||||
|
||||
@@ -34,12 +34,12 @@ public:
|
||||
void setValue(uint8_t value);
|
||||
void setValue(int value);
|
||||
void setValue(short value);
|
||||
void setValue(const wstring& value);
|
||||
void setValue(const std::wstring& value);
|
||||
void setValue(std::shared_ptr<ItemInstance> value);
|
||||
uint8_t getValue_byte();
|
||||
int getValue_int();
|
||||
short getValue_short();
|
||||
wstring getValue_wstring();
|
||||
std::wstring getValue_wstring();
|
||||
std::shared_ptr<ItemInstance> getValue_itemInstance();
|
||||
int getType();
|
||||
bool isDirty();
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
// 4J - this function used to be a template, but there's only 3 varieties of use I've found so just hard-coding now, as
|
||||
// the original had some automatic Class to type sort of conversion that's a real pain for us to actually do
|
||||
void define(int id, uint8_t value);
|
||||
void define(int id, const wstring& value);
|
||||
void define(int id, const std::wstring& value);
|
||||
void define(int id, int value);
|
||||
void define(int id, short value);
|
||||
void defineNULL(int id, void *pVal);
|
||||
@@ -90,14 +90,14 @@ public:
|
||||
short getShort(int id);
|
||||
int getInteger(int id);
|
||||
float getFloat(int id);
|
||||
wstring getString(int id);
|
||||
std::wstring getString(int id);
|
||||
std::shared_ptr<ItemInstance> getItemInstance(int id);
|
||||
Pos *getPos(int id);
|
||||
// 4J - using overloads rather than template here
|
||||
void set(int id, uint8_t value);
|
||||
void set(int id, int value);
|
||||
void set(int id, short value);
|
||||
void set(int id, const wstring& value);
|
||||
void set(int id, const std::wstring& value);
|
||||
void set(int id, std::shared_ptr<ItemInstance>);
|
||||
void markDirty(int id);
|
||||
bool isDirty();
|
||||
|
||||
Reference in New Issue
Block a user