Skip to content

Commit 8351bd5

Browse files
authored
refactor: work around sign conversion warning (#548)
1 parent 76f6d52 commit 8351bd5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

include/cpp2util.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,9 +1526,7 @@ struct args_t : std::vector<std::string_view>
15261526
inline auto make_args(int argc, char const* const* argv) -> args_t
15271527
{
15281528
auto ret = args_t{argc, argv};
1529-
for (auto i = 0; i < argc; ++i) {
1530-
ret[i] = std::string_view{argv[i]};
1531-
}
1529+
std::copy(argv, argv + argc, ret.data());
15321530
return ret;
15331531
}
15341532

0 commit comments

Comments
 (0)