mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
[Updating] Add versioning to UpdateState.json (#12744)
- fix "Check for updates" hang if UpdateState.json was deleted while the page is open
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <optional>
|
||||
#include <compare>
|
||||
|
||||
struct VersionHelper
|
||||
{
|
||||
VersionHelper(std::string str);
|
||||
VersionHelper(const size_t major, const size_t minor, const size_t revision);
|
||||
|
||||
auto operator<=>(const VersionHelper&) const = default;
|
||||
|
||||
static std::optional<VersionHelper> fromString(std::string_view s);
|
||||
static std::optional<VersionHelper> fromString(std::wstring_view s);
|
||||
|
||||
size_t major;
|
||||
size_t minor;
|
||||
|
||||
Reference in New Issue
Block a user