Tweaks to the rapidjson stuff so it all plays nice, as well as minor additions to Filestream so it works with the rapidjson stuff.

This commit is contained in:
Areloch 2019-04-21 04:19:38 -05:00
parent dbd48cdbc1
commit 73cb9343d2
4 changed files with 5 additions and 3 deletions

View file

@ -39,6 +39,7 @@ public:
BUFFER_INVALID = 0xffffffff // file offsets must all be less than this
};
typedef char Ch; //!< Character type. Only support char.
public:
FileStream(); // default constructor
virtual ~FileStream(); // destructor
@ -60,6 +61,8 @@ public:
virtual void close();
bool flush();
//rjson compatibility
bool Flush() { return flush(); }
FileStream* clone() const;
protected:

View file

@ -2391,7 +2391,7 @@ public:
ParseErrorCode GetParseError() const { return parseResult_.Code(); }
//! Get the position of last parsing error in input, 0 otherwise.
size_t GetErrorOffset() const { return parseResult_.Offset(); }
size_t GetErrorOffset() const { return parseResult_._Offset(); }
//! Implicit conversion to get the last parse result
#ifndef __clang // -Wdocumentation

View file

@ -106,7 +106,6 @@ enum ParseErrorCode {
struct ParseResult {
//!! Unspecified boolean type
typedef bool (ParseResult::*BooleanType)() const;
private:
ParseErrorCode code_;
size_t offset_;

View file

@ -683,7 +683,7 @@ public:
ParseErrorCode GetParseErrorCode() const { return parseResult_.Code(); }
//! Get the position of last parsing error in input, 0 otherwise.
size_t GetErrorOffset() const { return parseResult_.Offset(); }
size_t GetErrorOffset() const { return parseResult_._Offset(); }
protected:
void SetParseError(ParseErrorCode code, size_t offset) { parseResult_.Set(code, offset); }