summaryrefslogtreecommitdiff
path: root/DevTools/IPCCompiler
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-25 14:49:47 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-25 14:52:35 +0100
commitceec1a7d38d4c8941dbf537b85bd50f0030ffbec (patch)
tree2b137c37ae0f331bb3626583a619a3175ef614d4 /DevTools/IPCCompiler
parent9c6f7d3e7d2252ad2d51f2c7c7379cab867fa477 (diff)
downloadserenity-ceec1a7d38d4c8941dbf537b85bd50f0030ffbec.zip
AK: Make Vector use size_t for its size and capacity
Diffstat (limited to 'DevTools/IPCCompiler')
-rw-r--r--DevTools/IPCCompiler/main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/DevTools/IPCCompiler/main.cpp b/DevTools/IPCCompiler/main.cpp
index 26edb81709..b12e8328fa 100644
--- a/DevTools/IPCCompiler/main.cpp
+++ b/DevTools/IPCCompiler/main.cpp
@@ -263,7 +263,7 @@ int main(int argc, char** argv)
}
builder.append('(');
- for (int i = 0; i < parameters.size(); ++i) {
+ for (size_t i = 0; i < parameters.size(); ++i) {
auto& parameter = parameters[i];
builder.append("const ");
builder.append(parameter.type);
@@ -273,7 +273,7 @@ int main(int argc, char** argv)
builder.append(", ");
}
builder.append(") : ");
- for (int i = 0; i < parameters.size(); ++i) {
+ for (size_t i = 0; i < parameters.size(); ++i) {
auto& parameter = parameters[i];
builder.append("m_");
builder.append(parameter.name);
@@ -310,9 +310,9 @@ int main(int argc, char** argv)
dbg() << " " << parameter.type << " " << parameter.name << " = " << initial_value << ";";
if (parameter.type == "Vector<Gfx::Rect>") {
- dbg() << " int " << parameter.name << "_size = 0;";
+ dbg() << " u64 " << parameter.name << "_size = 0;";
dbg() << " stream >> " << parameter.name << "_size;";
- dbg() << " for (int i = 0; i < " << parameter.name << "_size; ++i) {";
+ dbg() << " for (size_t i = 0; i < " << parameter.name << "_size; ++i) {";
dbg() << " Gfx::Rect rect;";
dbg() << " if (!decoder.decode(rect))";
dbg() << " return nullptr;";
@@ -325,7 +325,7 @@ int main(int argc, char** argv)
}
StringBuilder builder;
- for (int i = 0; i < parameters.size(); ++i) {
+ for (size_t i = 0; i < parameters.size(); ++i) {
auto& parameter = parameters[i];
builder.append(parameter.name);
if (i != parameters.size() - 1)
@@ -355,7 +355,7 @@ int main(int argc, char** argv)
dbg() << " stream << m_" << parameter.name << ".width();";
dbg() << " stream << m_" << parameter.name << ".height();";
} else if (parameter.type == "Vector<Gfx::Rect>") {
- dbg() << " stream << m_" << parameter.name << ".size();";
+ dbg() << " stream << (u64)m_" << parameter.name << ".size();";
dbg() << " for (auto& rect : m_" << parameter.name << ") {";
dbg() << " stream << rect.x();";
dbg() << " stream << rect.y();";