Merge pull request #1279 from ethereum/semver-helper

Export major/minor/patch helpers on SemVerVersion
This commit is contained in:
chriseth 2016-10-25 13:20:08 +02:00 committed by GitHub
commit 2f7c847ce4

View File

@ -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");
}; };