mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-19 14:27:55 +08:00
05f12dcdf1
- fix "Check for updates" hang if UpdateState.json was deleted while the page is open
23 lines
520 B
C++
23 lines
520 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <optional>
|
|
#include <compare>
|
|
|
|
struct VersionHelper
|
|
{
|
|
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;
|
|
size_t revision;
|
|
|
|
std::wstring toWstring() const;
|
|
std::string toString() const;
|
|
};
|