Closed bluetarpmedia closed 5 months ago
Clang reports this warning in cpp2util.h when -Wconversion is enabled:
cpp2util.h
-Wconversion
cpp2util.h:1774:49: warning: implicit conversion changes signedness: 'int' to 'std::size_t' (aka 'unsigned long') [-Wsign-conversion] 1774 | auto size() const -> std::size_t { return argc; } | ~~~~~~ ^~~~
So this PR adds a static_cast to silence the warning and show that the conversion is intentional.
static_cast
Thanks!
Minor nit: Sadly, because of the dratted silliness of mixed signedness, this needs to be unsafe_narrow...
unsafe_narrow
Clang reports this warning in
cpp2util.h
when-Wconversion
is enabled:So this PR adds a
static_cast
to silence the warning and show that the conversion is intentional.