- minor tweaks
This commit is contained in:
parent
cb2da141ec
commit
ec6e628d4f
3 changed files with 37 additions and 6 deletions
|
@ -413,7 +413,7 @@ JSON& JSON::operator[](int index) {
|
|||
|
||||
array_t* array = static_cast<array_t*>(_payload);
|
||||
|
||||
if (index >= array->size()) {
|
||||
if (index >= (int)array->size()) {
|
||||
throw std::runtime_error("cannot access element at index " + to_string(index));
|
||||
}
|
||||
|
||||
|
@ -428,7 +428,7 @@ const JSON& JSON::operator[](const int index) const {
|
|||
|
||||
array_t* array = static_cast<array_t*>(_payload);
|
||||
|
||||
if (index >= array->size()) {
|
||||
if (index >= (int)array->size()) {
|
||||
throw std::runtime_error("cannot access element at index " + to_string(index));
|
||||
}
|
||||
|
||||
|
|
|
@ -283,7 +283,7 @@ class JSON {
|
|||
|
||||
private:
|
||||
bool next();
|
||||
void error(std::string = "");
|
||||
void error(std::string = "") __attribute__((noreturn));
|
||||
std::string parseString();
|
||||
void parseTrue();
|
||||
void parseFalse();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue