diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-25 14:49:47 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-25 14:52:35 +0100 |
commit | ceec1a7d38d4c8941dbf537b85bd50f0030ffbec (patch) | |
tree | 2b137c37ae0f331bb3626583a619a3175ef614d4 /DevTools/HackStudio | |
parent | 9c6f7d3e7d2252ad2d51f2c7c7379cab867fa477 (diff) | |
download | serenity-ceec1a7d38d4c8941dbf537b85bd50f0030ffbec.zip |
AK: Make Vector use size_t for its size and capacity
Diffstat (limited to 'DevTools/HackStudio')
-rw-r--r-- | DevTools/HackStudio/Project.cpp | 4 | ||||
-rw-r--r-- | DevTools/HackStudio/TerminalWrapper.cpp | 2 | ||||
-rw-r--r-- | DevTools/HackStudio/main.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/DevTools/HackStudio/Project.cpp b/DevTools/HackStudio/Project.cpp index eb377f1c80..41466844d8 100644 --- a/DevTools/HackStudio/Project.cpp +++ b/DevTools/HackStudio/Project.cpp @@ -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; diff --git a/DevTools/HackStudio/TerminalWrapper.cpp b/DevTools/HackStudio/TerminalWrapper.cpp index 3f18359e53..4adb983420 100644 --- a/DevTools/HackStudio/TerminalWrapper.cpp +++ b/DevTools/HackStudio/TerminalWrapper.cpp @@ -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)); diff --git a/DevTools/HackStudio/main.cpp b/DevTools/HackStudio/main.cpp index 6fd9f4f8c5..3b4db29de0 100644 --- a/DevTools/HackStudio/main.cpp +++ b/DevTools/HackStudio/main.cpp @@ -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); |