Suppress effc++ warning in messagereader
This commit is contained in:
parent
a5c1324da9
commit
a73ed78fd6
@ -12,8 +12,13 @@ using namespace rapidjson;
|
||||
|
||||
typedef map<string, string> MessageMap;
|
||||
|
||||
#if defined(__GNUC__)
|
||||
RAPIDJSON_DIAG_PUSH
|
||||
RAPIDJSON_DIAG_OFF(effc++)
|
||||
#endif
|
||||
|
||||
struct MessageHandler : public BaseReaderHandler<> {
|
||||
MessageHandler() : state_(kExpectObjectStart) {}
|
||||
MessageHandler() : messages_(), state_(kExpectObjectStart), name_() {}
|
||||
|
||||
bool StartObject() {
|
||||
switch (state_) {
|
||||
@ -53,6 +58,10 @@ struct MessageHandler : public BaseReaderHandler<> {
|
||||
std::string name_;
|
||||
};
|
||||
|
||||
#if defined(__GNUC__)
|
||||
RAPIDJSON_DIAG_POP
|
||||
#endif
|
||||
|
||||
void ParseMessages(const char* json, MessageMap& messages) {
|
||||
Reader reader;
|
||||
MessageHandler handler;
|
||||
|
Loading…
x
Reference in New Issue
Block a user