From d8997849d4b264fbab75e4d9cdf52cb2bdc2a99e Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Fri, 28 Feb 2025 18:55:40 +0000 Subject: [PATCH] Fix Plugin::version_ field never being used --- src/api/plugin.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/plugin.cpp b/src/api/plugin.cpp index 13ff7b3a..86c11833 100644 --- a/src/api/plugin.cpp +++ b/src/api/plugin.cpp @@ -266,7 +266,9 @@ Plugin::Plugin(const GameType gameType, } } - tags_ = ExtractBashTags(GetDescription()); + const auto description = GetDescription(); + tags_ = ExtractBashTags(description); + version_ = ExtractVersion(description); } catch (const std::system_error& e) { if (e.code().category() == esplugin_category()) { throw; @@ -318,9 +320,7 @@ std::optional Plugin::GetHeaderVersion() const { return version; } -std::optional Plugin::GetVersion() const { - return ExtractVersion(GetDescription()); -} +std::optional Plugin::GetVersion() const { return version_; } std::vector Plugin::GetMasters() const { if (esPlugin == nullptr) {