mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
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:
parent
ec3a2368f9
commit
d2bae1c72b
4 changed files with 5 additions and 3 deletions
|
|
@ -39,6 +39,7 @@ public:
|
||||||
BUFFER_INVALID = 0xffffffff // file offsets must all be less than this
|
BUFFER_INVALID = 0xffffffff // file offsets must all be less than this
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef char Ch; //!< Character type. Only support char.
|
||||||
public:
|
public:
|
||||||
FileStream(); // default constructor
|
FileStream(); // default constructor
|
||||||
virtual ~FileStream(); // destructor
|
virtual ~FileStream(); // destructor
|
||||||
|
|
@ -60,6 +61,8 @@ public:
|
||||||
virtual void close();
|
virtual void close();
|
||||||
|
|
||||||
bool flush();
|
bool flush();
|
||||||
|
//rjson compatibility
|
||||||
|
bool Flush() { return flush(); }
|
||||||
FileStream* clone() const;
|
FileStream* clone() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
|
|
@ -2391,7 +2391,7 @@ public:
|
||||||
ParseErrorCode GetParseError() const { return parseResult_.Code(); }
|
ParseErrorCode GetParseError() const { return parseResult_.Code(); }
|
||||||
|
|
||||||
//! Get the position of last parsing error in input, 0 otherwise.
|
//! 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
|
//! Implicit conversion to get the last parse result
|
||||||
#ifndef __clang // -Wdocumentation
|
#ifndef __clang // -Wdocumentation
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,6 @@ enum ParseErrorCode {
|
||||||
struct ParseResult {
|
struct ParseResult {
|
||||||
//!! Unspecified boolean type
|
//!! Unspecified boolean type
|
||||||
typedef bool (ParseResult::*BooleanType)() const;
|
typedef bool (ParseResult::*BooleanType)() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ParseErrorCode code_;
|
ParseErrorCode code_;
|
||||||
size_t offset_;
|
size_t offset_;
|
||||||
|
|
|
||||||
|
|
@ -683,7 +683,7 @@ public:
|
||||||
ParseErrorCode GetParseErrorCode() const { return parseResult_.Code(); }
|
ParseErrorCode GetParseErrorCode() const { return parseResult_.Code(); }
|
||||||
|
|
||||||
//! Get the position of last parsing error in input, 0 otherwise.
|
//! 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:
|
protected:
|
||||||
void SetParseError(ParseErrorCode code, size_t offset) { parseResult_.Set(code, offset); }
|
void SetParseError(ParseErrorCode code, size_t offset) { parseResult_.Set(code, offset); }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue