Skip to content

Commit

Permalink
log: use pointer instead of iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
rockwotj committed Feb 17, 2025
1 parent dbf51e2 commit 7230bf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ void log_buf::realloc_buffer_and_append(char c) noexcept {
_alloc_failure = true;
std::string_view msg = "(log buffer allocation failure)";
auto can_copy = std::min(msg.size(), size_t(_current - _begin));
std::memcpy(_current - can_copy, msg.begin(), can_copy);
std::memcpy(_current - can_copy, msg.data(), can_copy);
}
}

Expand Down

0 comments on commit 7230bf9

Please sign in to comment.