AK: Make Vector use size_t for its size and capacity

This commit is contained in:
Andreas Kling 2020-02-25 14:49:47 +01:00
parent 9c6f7d3e7d
commit ceec1a7d38
Notes: sideshowbarker 2024-07-19 09:04:32 +09:00
94 changed files with 323 additions and 317 deletions

View file

@ -62,7 +62,7 @@ GUI::ModelIndex ProfileModel::parent_index(const GUI::ModelIndex& index) const
// NOTE: If the parent has no parent, it's a root, so we have to look among the roots.
if (!node.parent()->parent()) {
for (int row = 0; row < m_profile.roots().size(); ++row) {
for (size_t row = 0; row < m_profile.roots().size(); ++row) {
if (m_profile.roots()[row].ptr() == node.parent()) {
return create_index(row, index.column(), node.parent());
}
@ -71,7 +71,7 @@ GUI::ModelIndex ProfileModel::parent_index(const GUI::ModelIndex& index) const
return {};
}
for (int row = 0; row < node.parent()->parent()->children().size(); ++row) {
for (size_t row = 0; row < node.parent()->parent()->children().size(); ++row) {
if (node.parent()->parent()->children()[row].ptr() == node.parent())
return create_index(row, index.column(), node.parent());
}