1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +00:00

LibIPC: Move IPC::Encoder functions out of line

Compiling anything that includes generated IPC messages is painfully
slow at the moment. This moves the encoding helpers out of line, which
helps a bit. Doing the same for decoding will help more.
This commit is contained in:
Andreas Kling 2020-02-15 11:27:47 +01:00
parent ef01af1cb2
commit 2ae9a56c3f
4 changed files with 157 additions and 109 deletions

View file

@ -392,14 +392,7 @@ int main(int argc, char** argv)
dbg() << " stream << endpoint_magic();";
dbg() << " stream << (int)MessageID::" << name << ";";
for (auto& parameter : parameters) {
if (parameter.type == "String") {
dbg() << " if (m_" << parameter.name << ".is_null()) {";
dbg() << " stream << (i32)-1;";
dbg() << " } else {";
dbg() << " stream << static_cast<i32>(m_" << parameter.name << ".length());";
dbg() << " stream << m_" << parameter.name << ";";
dbg() << " }";
} else if (parameter.type == "Gfx::Color") {
if (parameter.type == "Gfx::Color") {
dbg() << " stream << m_" << parameter.name << ".value();";
} else if (parameter.type == "Gfx::Size") {
dbg() << " stream << m_" << parameter.name << ".width();";