aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-10-25 09:30:25 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2016-10-25 19:13:41 +0800
commit7a988555c36f00ef019b2221daf224966d8b4c6c (patch)
tree83a12e09ebf4f36ec93c9757694ead23e1b1608c /libsolidity
parent067109e1ae5199f285d7cae211930cf9449f65f4 (diff)
downloaddexon-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.h6
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");
};