mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 20:57:22 +02:00
Version helper compare operator fix (#1824)
* Version helper compare operator fix * Simplyfy compare code
This commit is contained in:
committed by
GitHub
parent
a6b7ba41ee
commit
90a228619e
@@ -110,16 +110,15 @@ std::future<std::optional<new_version_download_info>> check_for_new_github_relea
|
||||
winrt::Windows::Foundation::Uri release_page_uri{ json_body.GetNamedString(L"html_url") };
|
||||
|
||||
VersionHelper github_version(winrt::to_string(new_version));
|
||||
|
||||
VersionHelper current_version(VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION);
|
||||
|
||||
if (current_version > github_version)
|
||||
if (github_version > current_version)
|
||||
{
|
||||
co_return std::nullopt;
|
||||
co_return new_version_download_info{ std::move(release_page_uri), new_version.c_str() };
|
||||
}
|
||||
else
|
||||
{
|
||||
co_return new_version_download_info{ std::move(release_page_uri), new_version.c_str() };
|
||||
co_return std::nullopt;
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
|
||||
Reference in New Issue
Block a user