core: fix non-empty args in send* fns

This commit is contained in:
Vaxry 2024-04-20 02:28:03 +01:00
parent e50948947a
commit 5f40a4fd2f

View file

@ -408,13 +408,15 @@ static const void* {}[] = {{
for (auto& ev : iface.events) { for (auto& ev : iface.events) {
const auto EVENT_NAME = camelize("send_" + ev.name); const auto EVENT_NAME = camelize("send_" + ev.name);
std::string argsC = ", "; std::string argsC = "";
for (auto& arg : ev.args) { for (auto& arg : ev.args) {
argsC += arg.CType + " " + arg.name + ", "; argsC += arg.CType + " " + arg.name + ", ";
} }
argsC.pop_back(); if (!argsC.empty()) {
argsC.pop_back(); argsC.pop_back();
argsC.pop_back();
}
std::string argsN = ", "; std::string argsN = ", ";
for (auto& arg : ev.args) { for (auto& arg : ev.args) {