IPCCompiler: Don't generate "OwnPtr<void>" as a handle() return type

This was happening for async (response-less) messages, since they were
returning void and were were always just wrapping the return type in
an OwnPtr no matter what.
This commit is contained in:
Andreas Kling 2019-08-03 21:33:12 +02:00
parent 3100e8dee5
commit 116d551f82
Notes: sideshowbarker 2024-07-19 12:54:43 +09:00

View file

@ -366,13 +366,15 @@ int main(int argc, char** argv)
String return_type = "void";
if (message.is_synchronous) {
StringBuilder builder;
builder.append("OwnPtr<");
builder.append(endpoint.name);
builder.append("::");
builder.append(message.name);
builder.append("Response");
builder.append(">");
return_type = builder.to_string();
}
dbg() << " virtual OwnPtr<" << return_type << "> handle(const " << endpoint.name << "::" << message.name << "&) = 0;";
dbg() << " virtual " << return_type << " handle(const " << endpoint.name << "::" << message.name << "&) = 0;";
}
dbg() << "private:";