Skip to content

Commit b84e0c1

Browse files
committed
JSONCPP_ISTREAM
1 parent 1e99064 commit b84e0c1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

include/json/reader.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class JSON_API Reader {
9999

100100
/// \brief Parse from input stream.
101101
/// \see Json::operator>>(std::istream&, Json::Value&).
102-
bool parse(std::istream& is, Value& root, bool collectComments = true);
102+
bool parse(JSONCPP_ISTREAM& is, Value& root, bool collectComments = true);
103103

104104
/** \brief Returns a user friendly string that list errors in the parsed
105105
* document.
@@ -366,7 +366,7 @@ class JSON_API CharReaderBuilder : public CharReader::Factory {
366366
*/
367367
bool JSON_API parseFromStream(
368368
CharReader::Factory const&,
369-
std::istream&,
369+
JSONCPP_ISTREAM&,
370370
Value* root, std::string* errs);
371371

372372
/** \brief Read from 'sin' into 'root'.
@@ -393,7 +393,7 @@ bool JSON_API parseFromStream(
393393
\throw std::exception on parse error.
394394
\see Json::operator<<()
395395
*/
396-
JSON_API std::istream& operator>>(std::istream&, Value&);
396+
JSON_API JSONCPP_ISTREAM& operator>>(JSONCPP_ISTREAM&, Value&);
397397

398398
} // namespace Json
399399

src/lib_json/json_reader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2007,7 +2007,7 @@ void CharReaderBuilder::setDefaults(Json::Value* settings)
20072007
// global functions
20082008

20092009
bool parseFromStream(
2010-
CharReader::Factory const& fact, std::istream& sin,
2010+
CharReader::Factory const& fact, JSONCPP_ISTREAM& sin,
20112011
Value* root, std::string* errs)
20122012
{
20132013
JSONCPP_OSTRINGSTREAM ssin;
@@ -2020,7 +2020,7 @@ bool parseFromStream(
20202020
return reader->parse(begin, end, root, errs);
20212021
}
20222022

2023-
std::istream& operator>>(std::istream& sin, Value& root) {
2023+
JSONCPP_ISTREAM& operator>>(JSONCPP_ISTREAM& sin, Value& root) {
20242024
CharReaderBuilder b;
20252025
std::string errs;
20262026
bool ok = parseFromStream(b, sin, &root, &errs);

0 commit comments

Comments
 (0)