- minor tweaks

This commit is contained in:
Niels 2013-07-05 16:45:17 +02:00
parent cb2da141ec
commit ec6e628d4f
3 changed files with 37 additions and 6 deletions

View file

@ -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));
}

View file

@ -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();