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

This commit is contained in:
Manu343726
2017-08-20 13:58:05 +02:00
committed by Victor Zverovich
parent c2201ce02e
commit 14d8534900

View File

@ -742,7 +742,7 @@ template <typename T>
template <typename U>
void Buffer<T>::append(const U *begin, const U *end) {
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_)
grow(new_size);
std::uninitialized_copy(begin, end,