From f0424d682ef24530f901616611fd04f831c8b432 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 15 Aug 2018 18:25:32 +0200 Subject: Reorder inline function definitions to pacify MinGW GCC (DLL linkage) --- libbutl/semantic-version.mxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libbutl/semantic-version.mxx') diff --git a/libbutl/semantic-version.mxx b/libbutl/semantic-version.mxx index d64eb82..b095f01 100644 --- a/libbutl/semantic-version.mxx +++ b/libbutl/semantic-version.mxx @@ -122,7 +122,13 @@ LIBBUTL_MODEXPORT namespace butl // lexicographically. // int - compare (const semantic_version&, bool ignore_build = false) const; + compare (const semantic_version& v, bool ignore_build = false) const + { + return (major != v.major ? (major < v.major ? -1 : 1) : + minor != v.minor ? (minor < v.minor ? -1 : 1) : + patch != v.patch ? (patch < v.patch ? -1 : 1) : + ignore_build ? 0 : build.compare (v.build)); + } }; // Try to parse a string as a semantic version returning nullopt if invalid. -- cgit v1.1