modify parseFromStream method.
This commit is contained in:
parent
d2e6a971f4
commit
bc46b78c2d
@ -1948,9 +1948,8 @@ void CharReaderBuilder::setDefaults(Json::Value* settings) {
|
|||||||
|
|
||||||
bool parseFromStream(CharReader::Factory const& fact, IStream& sin, Value* root,
|
bool parseFromStream(CharReader::Factory const& fact, IStream& sin, Value* root,
|
||||||
String* errs) {
|
String* errs) {
|
||||||
OStringStream ssin;
|
String doc;
|
||||||
ssin << sin.rdbuf();
|
std::getline(sin, doc, static_cast<char> EOF);
|
||||||
String doc = ssin.str();
|
|
||||||
char const* begin = doc.data();
|
char const* begin = doc.data();
|
||||||
char const* end = begin + doc.size();
|
char const* end = begin + doc.size();
|
||||||
// Note that we do not actually need a null-terminator.
|
// Note that we do not actually need a null-terminator.
|
||||||
|
Loading…
Reference in New Issue
Block a user