MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / compare_semver

Function compare_semver

src/include/update.hpp:49–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49static int compare_semver(std::string a, std::string b) {
50 a = strip_v_prefix(a);
51 b = strip_v_prefix(b);
52 auto A = split_semver(a), B = split_semver(b);
53 for (int i = 0; i < 3; ++i) {
54 if (A[i] != B[i]) return (A[i] > B[i]) ? 1 : -1;
55 }
56 return 0;
57}
58
59static bool g_vercheck_warned_timeout = false;
60

Callers 1

Calls 2

strip_v_prefixFunction · 0.85
split_semverFunction · 0.85

Tested by

no test coverage detected