Skip to content

Commit

Permalink
Merge pull request #1226 from wravery/master
Browse files Browse the repository at this point in the history
Explicit cast from std::size_t to std::streamsize in cxx.cc
  • Loading branch information
dtolnay authored Jun 15, 2023
2 parents a369dc4 + 0a3ecf4 commit ed1e22e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cxx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ String::String(unsafe_bitcopy_t, const String &bits) noexcept
: repr(bits.repr) {}

std::ostream &operator<<(std::ostream &os, const String &s) {
os.write(s.data(), s.size());
os.write(s.data(), static_cast<std::streamsize>(s.size()));
return os;
}

Expand Down Expand Up @@ -374,7 +374,7 @@ void Str::swap(Str &rhs) noexcept {
}

std::ostream &operator<<(std::ostream &os, const Str &s) {
os.write(s.data(), s.size());
os.write(s.data(), static_cast<std::streamsize>(s.size()));
return os;
}

Expand Down

0 comments on commit ed1e22e

Please sign in to comment.