From 91ff96a7376881ab4a9933bf6a8bfbf63bf8384a Mon Sep 17 00:00:00 2001 From: Jonathan Dumaresq Date: Wed, 12 Dec 2018 14:16:12 -0500 Subject: [PATCH] remove the const attribute --- include/nlohmann/detail/input/input_adapters.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/nlohmann/detail/input/input_adapters.hpp b/include/nlohmann/detail/input/input_adapters.hpp index 83fd1609..98249774 100644 --- a/include/nlohmann/detail/input/input_adapters.hpp +++ b/include/nlohmann/detail/input/input_adapters.hpp @@ -53,17 +53,17 @@ Input adapter for stdio file access. This adapter read only 1 byte and do not us class file_input_adapter : public input_adapter_protocol { public: - explicit file_input_adapter(const FILE* file) noexcept + explicit file_input_adapter(FILE* file) noexcept : file(file) {} std::char_traits::int_type get_character() noexcept override { - return fgetc(const_cast(file)); + return fgetc(file); } private: /// the file pointer to read from - const FILE* file; + FILE* file; };