🚨 remove warnings

This commit is contained in:
Niels Lohmann 2020-06-22 22:32:21 +02:00
parent 29ad2178c6
commit 8b3d2399a4
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
10 changed files with 250 additions and 271 deletions

View file

@ -76,7 +76,7 @@ class input_stream_adapter
{
// clear stream flags; we use underlying streambuf I/O, do not
// maintain ifstream flags, except eof
if (is)
if (is != nullptr)
{
is->clear(is->rdstate() & std::ios::eofbit);
}
@ -411,7 +411,7 @@ template < typename CharT,
contiguous_bytes_input_adapter input_adapter(CharT b)
{
auto length = std::strlen(reinterpret_cast<const char*>(b));
auto ptr = reinterpret_cast<const char*>(b);
const auto* ptr = reinterpret_cast<const char*>(b);
return input_adapter(ptr, ptr + length);
}