diff --git a/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperWeapon.cpp b/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperWeapon.cpp index 8b39076b..430f3e4d 100644 --- a/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperWeapon.cpp +++ b/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperWeapon.cpp @@ -7,8 +7,6 @@ using namespace T6; -const std::string AssetDumperWeapon::EMPTY_STRING; - cspField_t AssetDumperWeapon::weapon_fields[] { {"displayName", offsetof(WeaponFullDef, weapVariantDef.szDisplayName), CSPFT_STRING}, @@ -1494,7 +1492,7 @@ namespace T6 } public: - InfoStringFromWeaponConverter(const WeaponFullDef* structure, const cspField_t* fields, const size_t fieldCount, std::function scriptStringValueCallback) + InfoStringFromWeaponConverter(const WeaponFullDef* structure, const cspField_t* fields, const size_t fieldCount, std::function scriptStringValueCallback) : InfoStringFromStructConverter(structure, fields, fieldCount, std::move(scriptStringValueCallback)) { } @@ -1634,10 +1632,10 @@ void AssetDumperWeapon::DumpAsset(Zone* zone, XAssetInfo* asse memset(fullDef, 0, sizeof WeaponFullDef); CopyToFullDef(asset->Asset(), fullDef); - InfoStringFromWeaponConverter converter(fullDef, weapon_fields, _countof(weapon_fields), [asset](const scr_string_t scrStr) + InfoStringFromWeaponConverter converter(fullDef, weapon_fields, _countof(weapon_fields), [asset](const scr_string_t scrStr) -> std::string { if (scrStr >= asset->m_script_strings.size()) - return EMPTY_STRING; + return ""; return asset->m_script_strings[scrStr]; }); diff --git a/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperWeapon.h b/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperWeapon.h index 41ad12b4..074d704d 100644 --- a/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperWeapon.h +++ b/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperWeapon.h @@ -7,7 +7,6 @@ namespace T6 { class AssetDumperWeapon final : public AbstractAssetDumper { - static const std::string EMPTY_STRING; static cspField_t weapon_fields[]; void CopyToFullDef(const WeaponVariantDef* weapon, WeaponFullDef* fullDef) const;