mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 02:37:36 +02:00
Explicitly cast range length to std::size_t to prevent conversion warnings
This commit is contained in:
committed by
Victor Zverovich
parent
c2201ce02e
commit
14d8534900
@ -742,7 +742,7 @@ template <typename T>
|
|||||||
template <typename U>
|
template <typename U>
|
||||||
void Buffer<T>::append(const U *begin, const U *end) {
|
void Buffer<T>::append(const U *begin, const U *end) {
|
||||||
FMT_ASSERT(end >= begin, "negative value");
|
FMT_ASSERT(end >= begin, "negative value");
|
||||||
std::size_t new_size = size_ + (end - begin);
|
std::size_t new_size = size_ + static_cast<std::size_t>(end - begin);
|
||||||
if (new_size > capacity_)
|
if (new_size > capacity_)
|
||||||
grow(new_size);
|
grow(new_size);
|
||||||
std::uninitialized_copy(begin, end,
|
std::uninitialized_copy(begin, end,
|
||||||
|
Reference in New Issue
Block a user