Skip to content

Commit

Permalink
impl: fix build for Windows+x86
Browse files Browse the repository at this point in the history
Add a cast to the `int64_t`-to-`size_t` conversion from googleapis#9351.
  • Loading branch information
devbww committed Jun 28, 2022
1 parent a9379bd commit d795614
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion google/cloud/internal/log_wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ std::string DebugString(Status const& status, TracingOptions const& options) {
}

std::string DebugString(std::string s, TracingOptions const& options) {
std::size_t const pos = options.truncate_string_field_longer_than();
auto const pos =
static_cast<std::size_t>(options.truncate_string_field_longer_than());
if (s.size() > pos) s.replace(pos, std::string::npos, "...<truncated>...");
return s;
}
Expand Down

0 comments on commit d795614

Please sign in to comment.