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