[Impeller] Avoid using the major and minor variable names. (flutter/engine#36009)
This commit is contained in:
@@ -26,7 +26,7 @@ std::optional<Version> Version::FromVector(const std::vector<size_t>& version) {
|
||||
|
||||
std::string Version::ToString() const {
|
||||
std::stringstream stream;
|
||||
stream << major << "." << minor << "." << patch;
|
||||
stream << major_version << "." << minor_version << "." << patch_version;
|
||||
return stream.str();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,18 +14,21 @@ namespace impeller {
|
||||
|
||||
struct Version {
|
||||
public:
|
||||
size_t major;
|
||||
size_t minor;
|
||||
size_t patch;
|
||||
size_t major_version;
|
||||
size_t minor_version;
|
||||
size_t patch_version;
|
||||
|
||||
constexpr Version(size_t p_major = 0, size_t p_minor = 0, size_t p_patch = 0)
|
||||
: major(p_major), minor(p_minor), patch(p_patch) {}
|
||||
: major_version(p_major),
|
||||
minor_version(p_minor),
|
||||
patch_version(p_patch) {}
|
||||
|
||||
static std::optional<Version> FromVector(const std::vector<size_t>& version);
|
||||
|
||||
constexpr bool IsAtLeast(const Version& other) {
|
||||
return std::tie(major, minor, patch) >=
|
||||
std::tie(other.major, other.minor, other.patch);
|
||||
return std::tie(major_version, minor_version, patch_version) >=
|
||||
std::tie(other.major_version, other.minor_version,
|
||||
other.patch_version);
|
||||
}
|
||||
|
||||
std::string ToString() const;
|
||||
|
||||
Reference in New Issue
Block a user