1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:48:12 +00:00

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
94 changed files with 323 additions and 317 deletions

View file

@ -146,7 +146,7 @@ public:
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, 0, node.parent);
}
@ -260,7 +260,7 @@ void Project::rebuild_tree()
ProjectTreeNode* current = root.ptr();
StringBuilder partial_path;
for (int i = 0; i < path.parts().size(); ++i) {
for (size_t i = 0; i < path.parts().size(); ++i) {
auto& part = path.parts().at(i);
if (part == ".")
continue;

View file

@ -143,7 +143,7 @@ void TerminalWrapper::run_command(const String& command)
auto parts = command.split(' ');
ASSERT(!parts.is_empty());
const char** args = (const char**) calloc(parts.size() + 1, sizeof(const char*));
for (int i = 0; i < parts.size(); i++) {
for (size_t i = 0; i < parts.size(); i++) {
args[i] = parts[i].characters();
}
rc = execvp(args[0], const_cast<char**>(args));

View file

@ -358,7 +358,7 @@ int main(int argc, char** argv)
wrappers.append(&child);
return IterationDecision::Continue;
});
for (int i = 0; i < wrappers.size(); ++i) {
for (size_t i = 0; i < wrappers.size(); ++i) {
if (g_current_editor_wrapper.ptr() == wrappers[i]) {
if (i == wrappers.size() - 1)
wrappers[0]->editor().set_focus(true);