Skip to content

Commit

Permalink
Explicitly cast range length to std::size_t to prevent conversion war…
Browse files Browse the repository at this point in the history
…nings
  • Loading branch information
Manu343726 authored and vitaut committed Aug 20, 2017
1 parent c2201ce commit 14d8534
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 14d8534

Please sign in to comment.