1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 16:15:10 +00:00

AK+Everywhere: Change int to size_t in JsonObject and JsonArray

This commit is contained in:
Max Wipfli 2021-06-28 11:57:37 +02:00 committed by Andreas Kling
parent 66526cbbaf
commit f45273649f
9 changed files with 14 additions and 14 deletions

View file

@ -59,7 +59,7 @@ bool JsonArrayModel::set(int row, Vector<JsonValue>&& values)
{
VERIFY(values.size() == m_fields.size());
if (row >= m_array.size())
if ((size_t)row >= m_array.size())
return false;
JsonObject obj;
@ -76,12 +76,12 @@ bool JsonArrayModel::set(int row, Vector<JsonValue>&& values)
bool JsonArrayModel::remove(int row)
{
if (row >= m_array.size())
if ((size_t)row >= m_array.size())
return false;
JsonArray new_array;
for (int i = 0; i < m_array.size(); ++i)
if (i != row)
for (size_t i = 0; i < m_array.size(); ++i)
if (i != (size_t)row)
new_array.append(m_array.at(i));
m_array = new_array;