Codechange: use SLE_INT8 instead of SLE_CHAR

This commit is contained in:
Rubidium
2026-06-27 23:12:09 +02:00
committed by rubidium42
parent a5430717b1
commit d0dcd1b134
2 changed files with 2 additions and 6 deletions
-4
View File
@@ -696,9 +696,6 @@ enum VarTypes : uint16_t {
SLE_VAR_NAME = 14 << 4, ///< old custom name to be converted to a string pointer
/* 1 more possible memory-primitives */
/* Shortcut values */
SLE_VAR_CHAR = SLE_VAR_I8,
/* Default combinations of variables. As savegames change, so can variables
* and thus it is possible that the saved value and internal size do not
* match and you need to specify custom combo. The defaults are listed here */
@@ -711,7 +708,6 @@ enum VarTypes : uint16_t {
SLE_UINT32 = SLE_FILE_U32 | SLE_VAR_U32,
SLE_INT64 = SLE_FILE_I64 | SLE_VAR_I64,
SLE_UINT64 = SLE_FILE_U64 | SLE_VAR_U64,
SLE_CHAR = SLE_FILE_I8 | SLE_VAR_CHAR,
SLE_STRINGID = SLE_FILE_STRINGID | SLE_VAR_U32,
SLE_STRING = SLE_FILE_STRING | SLE_VAR_STR,
SLE_STRINGQUOTE = SLE_FILE_STRING | SLE_VAR_STRQ,
+2 -2
View File
@@ -405,7 +405,7 @@ static const SaveLoad _script_byte[] = {
if (!test) {
_script_sl_byte = (uint8_t)len;
SlObject(nullptr, _script_byte);
SlCopy(const_cast<char *>(view.data()), len, SLE_CHAR);
SlCopy(const_cast<char *>(view.data()), len, SLE_INT8);
}
return true;
}
@@ -612,7 +612,7 @@ bool ScriptInstance::IsPaused()
case SQSL_STRING: {
SlObject(nullptr, _script_byte);
static char buf[std::numeric_limits<decltype(_script_sl_byte)>::max()];
SlCopy(buf, _script_sl_byte, SLE_CHAR);
SlCopy(buf, _script_sl_byte, SLE_INT8);
if (data != nullptr) data->push_back(StrMakeValid(std::string_view(buf, _script_sl_byte)));
return true;
}