Ignore error in some places where push can't fail
This commit is contained in:
@@ -264,9 +264,7 @@ inline PRESERVE_NONE WeaselJsonStatus n_value(Parser3 *self, char *buf,
|
||||
self->callbacks->on_begin_object(self->userdata);
|
||||
++buf;
|
||||
self->pop();
|
||||
if (auto s = self->push({N_OBJECT2})) {
|
||||
return s;
|
||||
}
|
||||
std::ignore = self->push({N_OBJECT2});
|
||||
if (buf == bufEnd) {
|
||||
return WeaselJson_AGAIN;
|
||||
}
|
||||
@@ -275,9 +273,7 @@ inline PRESERVE_NONE WeaselJsonStatus n_value(Parser3 *self, char *buf,
|
||||
self->callbacks->on_begin_array(self->userdata);
|
||||
++buf;
|
||||
self->pop();
|
||||
if (auto s = self->push({N_ARRAY2})) {
|
||||
return s;
|
||||
}
|
||||
std::ignore = self->push({N_ARRAY2});
|
||||
if (buf == bufEnd) {
|
||||
return WeaselJson_AGAIN;
|
||||
}
|
||||
@@ -287,9 +283,7 @@ inline PRESERVE_NONE WeaselJsonStatus n_value(Parser3 *self, char *buf,
|
||||
self->dataBegin = self->writeBuf = buf;
|
||||
self->pop();
|
||||
self->strDfa.reset();
|
||||
if (auto s2 = self->push({N_STRING2})) {
|
||||
return s2;
|
||||
}
|
||||
std::ignore = self->push({N_STRING2});
|
||||
if (buf == bufEnd) {
|
||||
return WeaselJson_AGAIN;
|
||||
}
|
||||
@@ -308,9 +302,7 @@ inline PRESERVE_NONE WeaselJsonStatus n_value(Parser3 *self, char *buf,
|
||||
self->dataBegin = buf;
|
||||
self->pop();
|
||||
self->numDfa.reset();
|
||||
if (auto s2 = self->push({N_NUMBER})) {
|
||||
return s2;
|
||||
}
|
||||
std::ignore = self->push({N_NUMBER});
|
||||
if (buf == bufEnd) {
|
||||
return WeaselJson_AGAIN;
|
||||
}
|
||||
@@ -511,9 +503,7 @@ inline PRESERVE_NONE WeaselJsonStatus n_string(Parser3 *self, char *buf,
|
||||
self->dataBegin = self->writeBuf = buf;
|
||||
self->pop();
|
||||
self->strDfa.reset();
|
||||
if (auto s = self->push({N_STRING2})) {
|
||||
return s;
|
||||
}
|
||||
std::ignore = self->push({N_STRING2});
|
||||
if (buf == bufEnd) {
|
||||
return WeaselJson_AGAIN;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user