diff --git a/src/JSON.cc b/src/JSON.cc index ed2e4949..c225b5e8 100644 --- a/src/JSON.cc +++ b/src/JSON.cc @@ -22,7 +22,6 @@ //////////////////// std::mutex JSON::_token; -bool JSON::Parser::firstCall = true; /////////////////////////////////// @@ -1777,17 +1776,6 @@ Initialize the JSON parser given an input stream \p _is. */ JSON::Parser::Parser(std::istream& _is) { - // On first call, switch off syncing between C++ and C I/O. This call must - // be done before first I/O operation as the behavior may be undefined - // otherwise. - if (firstCall) - { - firstCall = false; - // Don't sync C++ and C I/O - // from http://www.manticmoo.com/articles/jeff/programming/c++/making-io-streams-efficient-in-c++.php - std::ios_base::sync_with_stdio(false); - } - while (_is) { std::string input_line; diff --git a/src/JSON.h b/src/JSON.h index 14ca857c..5d512fc4 100644 --- a/src/JSON.h +++ b/src/JSON.h @@ -432,10 +432,6 @@ class JSON char _current {}; /// the position inside the input buffer size_t _pos = 0; - - private: - /// variable to guard std::ios_base::sync_with_stdio - static bool firstCall; }; };