@@ -49,7 +49,7 @@ std::expected<std::string, parse_error> inc(version input,
49
49
}
50
50
auto incremented_major_int = major_int + 1 ;
51
51
auto major = std::to_string (incremented_major_int);
52
- result = version_weaver::version{std::move ( major) , " 0" , " 0" };
52
+ result = version_weaver::version{major, " 0" , " 0" };
53
53
break ;
54
54
}
55
55
case MINOR:
@@ -62,8 +62,8 @@ std::expected<std::string, parse_error> inc(version input,
62
62
return std::unexpected (parse_error::INVALID_MINOR);
63
63
}
64
64
auto incremented_minor_int = minor_int + 1 ;
65
- auto minor = std::to_string (incremented_minor_int);
66
- result = version_weaver::version{ input.major , std::move (minor ), " 0" };
65
+ result = version_weaver::version{
66
+ input.major , std::to_string (incremented_minor_int ), " 0" };
67
67
break ;
68
68
}
69
69
case PATCH:
@@ -86,9 +86,9 @@ std::expected<std::string, parse_error> inc(version input,
86
86
return std::unexpected (parse_error::INVALID_PRERELEASE);
87
87
}
88
88
auto incremented_prerelease_int = prerelease_int + 1 ;
89
- auto prerelease = std::to_string (incremented_prerelease_int);
90
- return version_weaver::version{ input.major , input.minor , input.patch ,
91
- prerelease };
89
+ return version_weaver::version{
90
+ input.major , input.minor , input.patch ,
91
+ std::to_string (incremented_prerelease_int) };
92
92
}
93
93
int patch_int;
94
94
auto [ptr, ec] =
@@ -98,9 +98,8 @@ std::expected<std::string, parse_error> inc(version input,
98
98
return std::unexpected (parse_error::INVALID_PATCH);
99
99
}
100
100
auto incremented_patch_int = patch_int + 1 ;
101
- auto patch = std::to_string (incremented_patch_int);
102
- result =
103
- version_weaver::version{input.major , input.minor , std::move (patch)};
101
+ result = version_weaver::version{input.major , input.minor ,
102
+ std::to_string (incremented_patch_int)};
104
103
break ;
105
104
}
106
105
case RELEASE: {
0 commit comments