Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
z4kn4fein committed Apr 14, 2023
2 parents 5406fa5 + 695f77f commit 3e37bf1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/semver/semver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ namespace semver
prerelease_descriptor increment() const {
std::vector<prerelease_part> new_parts = (m_parts);
int last_numeric_index = -1;
for (int i = 0; i < new_parts.size(); ++i) {
for (size_t i = 0; i < new_parts.size(); ++i) {
if (new_parts[i].numeric()) last_numeric_index = i;
}
if (last_numeric_index != -1) {
Expand All @@ -159,7 +159,7 @@ namespace semver
auto other_size = other.m_parts.size();

auto count = std::min(this_size, other_size);
for (int i = 0; i < count; ++i) {
for (size_t i = 0; i < count; ++i) {
int cmp = m_parts[i].compare(other.m_parts[i]);
if (cmp != 0) return cmp;
}
Expand Down Expand Up @@ -370,4 +370,4 @@ namespace semver
}
}

#endif // Z4KN4FEIN_SEMVER_H
#endif // Z4KN4FEIN_SEMVER_H

0 comments on commit 3e37bf1

Please sign in to comment.