Use TinyString for custom name fields which are almost always empty

This commit is contained in:
Jonathan G Rennison
2020-05-21 23:50:48 +01:00
parent 81e69fcbbe
commit 5243cfd6d0
14 changed files with 35 additions and 26 deletions

View File

@@ -893,6 +893,7 @@ void WriteValue(void *ptr, VarType conv, int64 val)
case SLE_VAR_I64: *(int64 *)ptr = val; break;
case SLE_VAR_U64: *(uint64*)ptr = val; break;
case SLE_VAR_NAME: *reinterpret_cast<std::string *>(ptr) = CopyFromOldName(val); break;
case SLE_VAR_CNAME: *(TinyString*)ptr = CopyFromOldName(val); break;
case SLE_VAR_NULL: break;
default: NOT_REACHED();
}