@@ -49,7 +49,7 @@ std::expected<std::string, parse_error> inc(version input,
4949 return std::unexpected (parse_error::INVALID_MAJOR);
5050 }
5151 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) );
5353 result = version_weaver::version{incremented, " 0" , " 0" };
5454 break ;
5555 }
@@ -63,7 +63,7 @@ std::expected<std::string, parse_error> inc(version input,
6363 return std::unexpected (parse_error::INVALID_MINOR);
6464 }
6565 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) );
6767 result = version_weaver::version{input.major , incremented, " 0" };
6868 break ;
6969 }
@@ -87,9 +87,9 @@ std::expected<std::string, parse_error> inc(version input,
8787 return std::unexpected (parse_error::INVALID_PRERELEASE);
8888 }
8989 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) };
9393 }
9494 int patch_int;
9595 auto [ptr, ec] =
@@ -99,7 +99,7 @@ std::expected<std::string, parse_error> inc(version input,
9999 return std::unexpected (parse_error::INVALID_PATCH);
100100 }
101101 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) );
103103 result = version_weaver::version{input.major , input.minor , incremented};
104104 break ;
105105 }
0 commit comments