Skip to content

Commit c9e9e86

Browse files
committed
Add explicit cast
to fix implicit cast introduced in 34d1455
1 parent 34d1455 commit c9e9e86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/protozero/buffer_string.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ struct buffer_customization<std::string> {
5757
protozero_assert(from <= buffer->size());
5858
protozero_assert(to <= buffer->size());
5959
protozero_assert(from <= to);
60-
buffer->erase(buffer->begin() + from,
61-
buffer->begin() + to);
60+
buffer->erase(buffer->begin() + static_cast<std::string::difference_type>(from),
61+
buffer->begin() + static_cast<std::string::difference_type>(to));
6262
}
6363

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

0 commit comments

Comments
 (0)