Commit 14d85349 authored by Manu343726's avatar Manu343726 Committed by Victor Zverovich

Explicitly cast range length to std::size_t to prevent conversion warnings

parent c2201ce0
...@@ -742,7 +742,7 @@ template <typename T> ...@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment