Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormiloyip@gmail.com <miloyip@gmail.com@c5894555-1306-4e8d-425f-1f6f381ee07c>2012-11-13 12:02:22 +0400
committermiloyip@gmail.com <miloyip@gmail.com@c5894555-1306-4e8d-425f-1f6f381ee07c>2012-11-13 12:02:22 +0400
commit9c68ce986e8212688b95e14d338affcb0cac5e19 (patch)
tree6ae5788c72451e128d77151893468f07cd75dcdf /include/rapidjson/encodedstream.h
parent821c6ab73cf389f69d226150717094049c75223a (diff)
Fixed a lots of vc2008/vs2010 and gcc3/4 warnings with the maximum warning level.
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@67 c5894555-1306-4e8d-425f-1f6f381ee07c
Diffstat (limited to 'include/rapidjson/encodedstream.h')
-rw-r--r--include/rapidjson/encodedstream.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/include/rapidjson/encodedstream.h b/include/rapidjson/encodedstream.h
index 40f61deb..0deecbbb 100644
--- a/include/rapidjson/encodedstream.h
+++ b/include/rapidjson/encodedstream.h
@@ -22,7 +22,7 @@ public:
Ch Peek() const { return current_; }
Ch Take() { Ch c = current_; current_ = Encoding::Take(is_); return c; }
- size_t Tell() const { is_.Tell(); }
+ size_t Tell() const { return is_.Tell(); }
// Not implemented
void Put(Ch c) { RAPIDJSON_ASSERT(false); }
@@ -31,6 +31,9 @@ public:
size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
private:
+ // Prohibit assignment for VC C4512 warning
+ EncodedInputStream& operator=(const EncodedInputStream&);
+
InputByteStream& is_;
Ch current_;
};
@@ -57,11 +60,14 @@ public:
// Not implemented
Ch Peek() const { RAPIDJSON_ASSERT(false); }
Ch Take() { RAPIDJSON_ASSERT(false); }
- size_t Tell() const { RAPIDJSON_ASSERT(false); }
+ size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; }
Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }
private:
+ // Prohibit assignment for VC C4512 warning
+ EncodedOutputStream& operator=(const EncodedOutputStream&);
+
OutputByteStream& os_;
};
@@ -149,6 +155,9 @@ private:
// RUntime check whether the size of character type is sufficient. It only perform checks with assertion.
switch (type_) {
+ case kUTF8:
+ // Do nothing
+ break;
case kUTF16LE:
case kUTF16BE:
RAPIDJSON_ASSERT(sizeof(Ch) >= 2);
@@ -196,6 +205,9 @@ public:
case kUTF32BE:
RAPIDJSON_ASSERT(sizeof(Ch) >= 4);
break;
+ case kUTF8:
+ // Do nothing
+ break;
}
static const PutFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Put) };
@@ -213,7 +225,7 @@ public:
// Not implemented
Ch Peek() const { RAPIDJSON_ASSERT(false); }
Ch Take() { RAPIDJSON_ASSERT(false); }
- size_t Tell() const { RAPIDJSON_ASSERT(false); }
+ size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; }
Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }