diff options
author | David Tolnay <dtolnay@gmail.com> | 2023-06-14 17:08:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-14 17:08:20 -0700 |
commit | ed1e22ec1801537cc0e2b9bbff61f7976170ad20 (patch) | |
tree | e077c5fefbefa875dd3c15c40bcdd9a526990a48 | |
parent | a369dc4b2c061e6e86e5dec467818218c9a48648 (diff) | |
parent | 0a3ecf47af56dcbdbea37308a4f93ec50b5efa1d (diff) | |
download | cxx-ed1e22ec1801537cc0e2b9bbff61f7976170ad20.tar.gz |
Merge pull request #1226 from wravery/master
Explicit cast from std::size_t to std::streamsize in cxx.cc
-rw-r--r-- | src/cxx.cc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } @@ -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; } |