Commit c64f378f authored by Ted Lyngmo's avatar Ted Lyngmo

Fix -Werror=effc++ errors with GNU 6.3.1

Fix "'MyHandler::type’ should be initialized in the member
initialization list [-Werror=effc++]" errors.

https://github.com/miloyip/rapidjson/issues/874
parent a1fac159
......@@ -16,6 +16,14 @@ struct MyHandler {
const char* type;
std::string data;
MyHandler() : type(), data() { Null(); }
MyHandler(const MyHandler& cpy) : type(cpy.type),data(cpy.data) {}
MyHandler& operator=(const MyHandler& cpy) {
type = cpy.type;
data = cpy.data;
return *this;
}
bool Null() { type = "Null"; data.clear(); return true; }
bool Bool(bool b) { type = "Bool:"; data = b? "true": "false"; return true; }
bool Int(int i) { type = "Int:"; data = stringify(i); return true; }
......
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