mirror of
https://github.com/nlohmann/json.git
synced 2026-03-07 01:31:25 +00:00
- minor tweaks
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user