diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-10-25 09:30:25 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2016-10-25 19:13:41 +0800 |
commit | 7a988555c36f00ef019b2221daf224966d8b4c6c (patch) | |
tree | 83a12e09ebf4f36ec93c9757694ead23e1b1608c /libsolidity | |
parent | 067109e1ae5199f285d7cae211930cf9449f65f4 (diff) | |
download | dexon-solidity-7a988555c36f00ef019b2221daf224966d8b4c6c.tar dexon-solidity-7a988555c36f00ef019b2221daf224966d8b4c6c.tar.gz dexon-solidity-7a988555c36f00ef019b2221daf224966d8b4c6c.tar.bz2 dexon-solidity-7a988555c36f00ef019b2221daf224966d8b4c6c.tar.lz dexon-solidity-7a988555c36f00ef019b2221daf224966d8b4c6c.tar.xz dexon-solidity-7a988555c36f00ef019b2221daf224966d8b4c6c.tar.zst dexon-solidity-7a988555c36f00ef019b2221daf224966d8b4c6c.zip |
Export major/minor/patch helpers on SemVerVersion
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/analysis/SemVerHandler.h | 6 |
1 files changed, 6 insertions, 0 deletions
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"); }; |