Compare normal version identifiers.
| 37 | |
| 38 | // Compare normal version identifiers. |
| 39 | int compare_normal(const Version_data& l, const Version_data& r) { |
| 40 | if (l.major > r.major) return 1; |
| 41 | if (l.major < r.major) return -1; |
| 42 | if (l.minor > r.minor) return 1; |
| 43 | if (l.minor < r.minor) return -1; |
| 44 | if (l.patch > r.patch) return 1; |
| 45 | if (l.patch < r.patch) return -1; |
| 46 | return 0; |
| 47 | } |
| 48 | |
| 49 | // Compare alphanumeric prerelease identifiers. |
| 50 | inline int cmp_alnum_prerel_ids(const string& l, const string& r) { |