Added IterativeParsingReaderHandler::RawNumber()

This commit is contained in:
Sergey Kosarevsky 2016-02-29 17:51:32 +01:00
parent 43a2c5694e
commit 3dba370486
2 changed files with 5 additions and 3 deletions

View File

@ -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);

View File

@ -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; }