Explorar o código

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

Areloch %!s(int64=6) %!d(string=hai) anos
pai
achega
73cb9343d2

+ 3 - 0
Engine/source/core/stream/fileStream.h

@@ -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:

+ 1 - 1
Engine/source/persistence/rapidjson/document.h

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

+ 0 - 1
Engine/source/persistence/rapidjson/error/error.h

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

+ 1 - 1
Engine/source/persistence/rapidjson/reader.h

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