Skip to content

Commit

Permalink
Merge pull request #122 from joto/explicit-cast
Browse files Browse the repository at this point in the history
Add explicit cast
  • Loading branch information
joto authored Dec 20, 2024
2 parents 34d1455 + c9e9e86 commit ead6d6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/protozero/buffer_string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ struct buffer_customization<std::string> {
protozero_assert(from <= buffer->size());
protozero_assert(to <= buffer->size());
protozero_assert(from <= to);
buffer->erase(buffer->begin() + from,
buffer->begin() + to);
buffer->erase(buffer->begin() + static_cast<std::string::difference_type>(from),
buffer->begin() + static_cast<std::string::difference_type>(to));
}

static char* at_pos(std::string* buffer, std::size_t pos) {
Expand Down

0 comments on commit ead6d6c

Please sign in to comment.