diff options
author | Milo Yip <miloyip@gmail.com> | 2014-06-25 12:06:00 +0400 |
---|---|---|
committer | Milo Yip <miloyip@gmail.com> | 2014-06-25 12:06:00 +0400 |
commit | e4ffa48a7563e892047c27f0a50fdeb6f71e6b8b (patch) | |
tree | 10a23f1332b47d4d163ee5005baf4771bfd46b85 /include/rapidjson/writer.h | |
parent | 23056abad12c5bddf73e00b728d1d53c712627a5 (diff) |
Remove some clang -Weverything warnings.
Diffstat (limited to 'include/rapidjson/writer.h')
-rw-r--r-- | include/rapidjson/writer.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/rapidjson/writer.h b/include/rapidjson/writer.h index 4f3aedc3..38dc8b8c 100644 --- a/include/rapidjson/writer.h +++ b/include/rapidjson/writer.h @@ -27,7 +27,7 @@ namespace rapidjson { \tparam OutputStream Type of output stream.
\tparam SourceEncoding Encoding of both source strings.
\tparam TargetEncoding Encoding of and output stream.
- \implements Handler
+ \note implements Handler concept
*/
template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename Allocator = MemoryPoolAllocator<> >
class Writer {
@@ -97,9 +97,9 @@ public: protected:
//! Information for each nested level
struct Level {
- Level(bool inArray_) : inArray(inArray_), valueCount(0) {}
- bool inArray; //!< true if in array, otherwise in object
+ Level(bool inArray_) : valueCount(0), inArray(inArray_) {}
size_t valueCount; //!< number of values in this level
+ bool inArray; //!< true if in array, otherwise in object
};
static const size_t kDefaultLevelDepth = 32;
@@ -164,7 +164,7 @@ protected: //! \todo Optimization with custom double-to-string converter.
void WriteDouble(double d) {
char buffer[100];
-#if _MSC_VER
+#ifdef _MSC_VER
int ret = sprintf_s(buffer, sizeof(buffer), "%g", d);
#else
int ret = snprintf(buffer, sizeof(buffer), "%g", d);
|