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);
|
self->callbacks->on_begin_object(self->userdata);
|
||||||
++buf;
|
++buf;
|
||||||
self->pop();
|
self->pop();
|
||||||
if (auto s = self->push({N_OBJECT2})) {
|
std::ignore = self->push({N_OBJECT2});
|
||||||
return s;
|
|
||||||
}
|
|
||||||
if (buf == bufEnd) {
|
if (buf == bufEnd) {
|
||||||
return WeaselJson_AGAIN;
|
return WeaselJson_AGAIN;
|
||||||
}
|
}
|
||||||
@@ -275,9 +273,7 @@ inline PRESERVE_NONE WeaselJsonStatus n_value(Parser3 *self, char *buf,
|
|||||||
self->callbacks->on_begin_array(self->userdata);
|
self->callbacks->on_begin_array(self->userdata);
|
||||||
++buf;
|
++buf;
|
||||||
self->pop();
|
self->pop();
|
||||||
if (auto s = self->push({N_ARRAY2})) {
|
std::ignore = self->push({N_ARRAY2});
|
||||||
return s;
|
|
||||||
}
|
|
||||||
if (buf == bufEnd) {
|
if (buf == bufEnd) {
|
||||||
return WeaselJson_AGAIN;
|
return WeaselJson_AGAIN;
|
||||||
}
|
}
|
||||||
@@ -287,9 +283,7 @@ inline PRESERVE_NONE WeaselJsonStatus n_value(Parser3 *self, char *buf,
|
|||||||
self->dataBegin = self->writeBuf = buf;
|
self->dataBegin = self->writeBuf = buf;
|
||||||
self->pop();
|
self->pop();
|
||||||
self->strDfa.reset();
|
self->strDfa.reset();
|
||||||
if (auto s2 = self->push({N_STRING2})) {
|
std::ignore = self->push({N_STRING2});
|
||||||
return s2;
|
|
||||||
}
|
|
||||||
if (buf == bufEnd) {
|
if (buf == bufEnd) {
|
||||||
return WeaselJson_AGAIN;
|
return WeaselJson_AGAIN;
|
||||||
}
|
}
|
||||||
@@ -308,9 +302,7 @@ inline PRESERVE_NONE WeaselJsonStatus n_value(Parser3 *self, char *buf,
|
|||||||
self->dataBegin = buf;
|
self->dataBegin = buf;
|
||||||
self->pop();
|
self->pop();
|
||||||
self->numDfa.reset();
|
self->numDfa.reset();
|
||||||
if (auto s2 = self->push({N_NUMBER})) {
|
std::ignore = self->push({N_NUMBER});
|
||||||
return s2;
|
|
||||||
}
|
|
||||||
if (buf == bufEnd) {
|
if (buf == bufEnd) {
|
||||||
return WeaselJson_AGAIN;
|
return WeaselJson_AGAIN;
|
||||||
}
|
}
|
||||||
@@ -511,9 +503,7 @@ inline PRESERVE_NONE WeaselJsonStatus n_string(Parser3 *self, char *buf,
|
|||||||
self->dataBegin = self->writeBuf = buf;
|
self->dataBegin = self->writeBuf = buf;
|
||||||
self->pop();
|
self->pop();
|
||||||
self->strDfa.reset();
|
self->strDfa.reset();
|
||||||
if (auto s = self->push({N_STRING2})) {
|
std::ignore = self->push({N_STRING2});
|
||||||
return s;
|
|
||||||
}
|
|
||||||
if (buf == bufEnd) {
|
if (buf == bufEnd) {
|
||||||
return WeaselJson_AGAIN;
|
return WeaselJson_AGAIN;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user