From 7a988555c36f00ef019b2221daf224966d8b4c6c Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 25 Oct 2016 02:30:25 +0100 Subject: Export major/minor/patch helpers on SemVerVersion --- libsolidity/analysis/SemVerHandler.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libsolidity') diff --git a/libsolidity/analysis/SemVerHandler.h b/libsolidity/analysis/SemVerHandler.h index 3c110b19..e3b642db 100644 --- a/libsolidity/analysis/SemVerHandler.h +++ b/libsolidity/analysis/SemVerHandler.h @@ -40,6 +40,12 @@ struct SemVerVersion std::string prerelease; 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"); }; -- cgit