mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #1279 from ethereum/semver-helper
Export major/minor/patch helpers on SemVerVersion
This commit is contained in:
commit
2f7c847ce4
@ -40,6 +40,12 @@ struct SemVerVersion
|
|||||||
std::string prerelease;
|
std::string prerelease;
|
||||||
std::string build;
|
std::string build;
|
||||||
|
|
||||||
|
unsigned major() const { return numbers[0]; }
|
||||||
|
unsigned minor() const { return numbers[1]; }
|
||||||
|
unsigned patch() const { return numbers[2]; }
|
||||||
|
|
||||||
|
bool isPrerelease() const { return !prerelease.empty(); }
|
||||||
|
|
||||||
explicit SemVerVersion(std::string const& _versionString = "0.0.0");
|
explicit SemVerVersion(std::string const& _versionString = "0.0.0");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user