From afc163f3449a115f123e6cb6ffd83a251b674b67 Mon Sep 17 00:00:00 2001 From: William JCM Date: Wed, 9 Feb 2022 20:16:14 +0100 Subject: [PATCH] Mass: rename a member. SteamIDs aren't used anymore in 0.8+ save files. --- src/Mass/Mass.cpp | 8 ++++---- src/Mass/Mass.h | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Mass/Mass.cpp b/src/Mass/Mass.cpp index 9371ade..21f9a0e 100644 --- a/src/Mass/Mass.cpp +++ b/src/Mass/Mass.cpp @@ -193,7 +193,7 @@ void Mass::refreshValues() { return; } - _steamId = account_prop->value; + _account = account_prop->value; _state = State::Valid; } @@ -930,8 +930,8 @@ auto Mass::techs() -> Containers::ArrayView { return _tuning.techIds; } -auto Mass::updateSteamId(const std::string& steam_id) -> bool { - _steamId = steam_id; +auto Mass::updateAccount(const std::string& new_account) -> bool { + _account = new_account; auto account = _mass->at("Account"); if(!account) { @@ -939,7 +939,7 @@ auto Mass::updateSteamId(const std::string& steam_id) -> bool { return false; } - account->value = steam_id; + account->value = new_account; return _mass->saveToFile(); } diff --git a/src/Mass/Mass.h b/src/Mass/Mass.h index 450680e..c89c9f3 100644 --- a/src/Mass/Mass.h +++ b/src/Mass/Mass.h @@ -137,7 +137,8 @@ class Mass { auto architecture() -> Int&; auto techs() -> Containers::ArrayView; - auto updateSteamId(const std::string& steam_id) -> bool; + auto account() -> std::string const&; + auto updateAccount(const std::string& new_account) -> bool; private: void getCustomStyles(Containers::ArrayView styles, ArrayProperty* style_array); @@ -203,5 +204,5 @@ class Mass { Containers::StaticArray<7, Int> techIds; } _tuning; - std::string _steamId; + std::string _account; };