aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2023-06-14 17:08:20 -0700
committerGitHub <noreply@github.com>2023-06-14 17:08:20 -0700
commited1e22ec1801537cc0e2b9bbff61f7976170ad20 (patch)
treee077c5fefbefa875dd3c15c40bcdd9a526990a48
parenta369dc4b2c061e6e86e5dec467818218c9a48648 (diff)
parent0a3ecf47af56dcbdbea37308a4f93ec50b5efa1d (diff)
downloadcxx-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.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cxx.cc b/src/cxx.cc
index 4958eb08..4aac6427 100644
--- a/src/cxx.cc
+++ b/src/cxx.cc
@@ -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;
}