Commit 3dba3704 authored by Sergey Kosarevsky's avatar Sergey Kosarevsky

Added IterativeParsingReaderHandler::RawNumber()

parent 43a2c569
...@@ -1299,11 +1299,11 @@ private: ...@@ -1299,11 +1299,11 @@ private:
} }
else { else {
StackStream<typename TargetEncoding::Ch> stackStream(stack_); StackStream<typename TargetEncoding::Ch> stackStream(stack_);
SizeType numCharsToCopy = s.Length(); SizeType numCharsToCopy = s.Length();
while (numCharsToCopy--) { while (numCharsToCopy--) {
Transcoder<SourceEncoding, TargetEncoding>::Transcode(is, stackStream); Transcoder<SourceEncoding, TargetEncoding>::Transcode(is, stackStream);
} }
stackStream.Put('\0'); stackStream.Put('\0');
const typename TargetEncoding::Ch* str = stackStream.Pop(); const typename TargetEncoding::Ch* str = stackStream.Pop();
const SizeType length = static_cast<SizeType>(stackStream.Length()) - 1; const SizeType length = static_cast<SizeType>(stackStream.Length()) - 1;
cont = handler.RawNumber(str, SizeType(length), true); cont = handler.RawNumber(str, SizeType(length), true);
......
...@@ -1170,6 +1170,8 @@ struct IterativeParsingReaderHandler { ...@@ -1170,6 +1170,8 @@ struct IterativeParsingReaderHandler {
bool Double(double) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_DOUBLE; return true; } bool Double(double) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_DOUBLE; return true; }
bool RawNumber(const Ch*, SizeType, bool) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_STRING; return true; }
bool String(const Ch*, SizeType, bool) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_STRING; return true; } bool String(const Ch*, SizeType, bool) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_STRING; return true; }
bool StartObject() { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_STARTOBJECT; return true; } bool StartObject() { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_STARTOBJECT; return true; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment