♻️ change behavior for null FILE*

This commit is contained in:
Niels Lohmann 2022-07-22 18:56:31 +02:00
parent 5a97913e93
commit d07c454127
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 2 additions and 10 deletions

View File

@ -64,11 +64,7 @@ class file_input_adapter
std::char_traits<char>::int_type get_character() noexcept
{
if (JSON_HEDLEY_LIKELY(m_file != nullptr))
{
return std::fgetc(m_file);
}
return std::char_traits<char>::eof(); // LCOV_EXCL_LINE
return std::fgetc(m_file);
}
private:

View File

@ -5951,11 +5951,7 @@ class file_input_adapter
std::char_traits<char>::int_type get_character() noexcept
{
if (JSON_HEDLEY_LIKELY(m_file != nullptr))
{
return std::fgetc(m_file);
}
return std::char_traits<char>::eof(); // LCOV_EXCL_LINE
return std::fgetc(m_file);
}
private: