mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 23:37:35 +00:00
AK+Everywhere: Change int to size_t in JsonObject and JsonArray
This commit is contained in:
parent
66526cbbaf
commit
f45273649f
9 changed files with 14 additions and 14 deletions
|
@ -59,7 +59,7 @@ private:
|
|||
static Vector<Quote> parse_all(const JsonArray& array)
|
||||
{
|
||||
Vector<Quote> quotes;
|
||||
for (int i = 0; i < array.size(); ++i) {
|
||||
for (size_t i = 0; i < array.size(); ++i) {
|
||||
Optional<Quote> q = Quote::try_parse(array[i]);
|
||||
if (!q.has_value()) {
|
||||
warnln("WARNING: Could not parse quote #{}!", i);
|
||||
|
|
|
@ -112,7 +112,7 @@ static void print(const String& name, const JsonValue& value, Vector<String>& tr
|
|||
if (value.is_array()) {
|
||||
outln("{}[]{};", color_brace, color_off);
|
||||
trail.append(String::formatted("{}{}{}", color_name, name, color_off));
|
||||
for (int i = 0; i < value.as_array().size(); ++i) {
|
||||
for (size_t i = 0; i < value.as_array().size(); ++i) {
|
||||
auto element_name = String::formatted("{}{}[{}{}{}{}{}]{}", color_off, color_brace, color_off, color_index, i, color_off, color_brace, color_off);
|
||||
print(element_name, value.as_array()[i], trail);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue