Skip to content

Commit

Permalink
Fix clang warning
Browse files Browse the repository at this point in the history
  • Loading branch information
MikePopoloski committed Jul 25, 2023
1 parent 9bdde5d commit ded85a1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/slang/util/SmallVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,10 @@ class SmallVectorBase {
std::uninitialized_move(result, end(), begin() + newSize - existingOverlap);

// Copy in the new elements.
first = std::ranges::copy_n(first, existingOverlap, result).in;
first = std::ranges::copy_n(first,
static_cast<std::iter_difference_t<TIter>>(existingOverlap),
result)
.in;

// Insert the non-overwritten middle part.
std::ranges::uninitialized_copy(first, last, end(), end() + numElems - existingOverlap);
Expand Down

0 comments on commit ded85a1

Please sign in to comment.