Commit 473553bd authored by KaitoHH's avatar KaitoHH

fix gcc & cl warning

parent 9394b844
...@@ -17,6 +17,17 @@ ...@@ -17,6 +17,17 @@
#include "stream.h" #include "stream.h"
#if defined(__GNUC__)
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF(effc++)
#endif
#if defined(_MSC_VER) && _MSC_VER <= 1800
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF(4702) // unreachable code
RAPIDJSON_DIAG_OFF(4512) // assignment operator could not be generated
#endif
RAPIDJSON_NAMESPACE_BEGIN RAPIDJSON_NAMESPACE_BEGIN
...@@ -29,9 +40,9 @@ class CursorStreamWrapper : public GenericStreamWrapper<InputStream, Encoding> { ...@@ -29,9 +40,9 @@ class CursorStreamWrapper : public GenericStreamWrapper<InputStream, Encoding> {
public: public:
typedef typename Encoding::Ch Ch; typedef typename Encoding::Ch Ch;
CursorStreamWrapper(InputStream& is): CursorStreamWrapper(InputStream& is):
GenericStreamWrapper<InputStream, Encoding>(is), line_(1), col_(0) {} GenericStreamWrapper<InputStream, Encoding>(is), line_(1), col_(0) {}
// counting line and column number // counting line and column number
Ch Take() { Ch Take() {
Ch ch = this->is_.Take(); Ch ch = this->is_.Take();
...@@ -54,6 +65,14 @@ private: ...@@ -54,6 +65,14 @@ private:
size_t col_; //!< Current Column size_t col_; //!< Current Column
}; };
#if defined(_MSC_VER) && _MSC_VER <= 1800
RAPIDJSON_DIAG_POP
#endif
#if defined(__GNUC__)
RAPIDJSON_DIAG_POP
#endif
RAPIDJSON_NAMESPACE_END RAPIDJSON_NAMESPACE_END
#endif // RAPIDJSON_CURSORSTREAMWRAPPER_H_ #endif // RAPIDJSON_CURSORSTREAMWRAPPER_H_
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