♻️ replace EOF with std::char_traits<char>::eof()

pull/2756/head
Niels Lohmann 2021-05-04 10:22:34 +02:00
parent d4f446592f
commit b08139ea4b
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 2 additions and 2 deletions

View File

@ -105,7 +105,7 @@ class input_stream_adapter
{
auto res = sb->sbumpc();
// set eof manually, as we don't use the istream interface.
if (JSON_HEDLEY_UNLIKELY(res == EOF))
if (JSON_HEDLEY_UNLIKELY(res == std::char_traits<char>::eof()))
{
is->clear(is->rdstate() | std::ios::eofbit);
}

View File

@ -5332,7 +5332,7 @@ class input_stream_adapter
{
auto res = sb->sbumpc();
// set eof manually, as we don't use the istream interface.
if (JSON_HEDLEY_UNLIKELY(res == EOF))
if (JSON_HEDLEY_UNLIKELY(res == std::char_traits<char>::eof()))
{
is->clear(is->rdstate() | std::ios::eofbit);
}