We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3c232b commit 4448fd9Copy full SHA for 4448fd9
src/engine/compiler.cpp
@@ -167,6 +167,13 @@ void Compiler::addFunctionCall(BlockFunc f)
167
/*! Adds an argument to a procedure (custom block). */
168
void Compiler::addProcedureArg(std::string procCode, std::string argName)
169
{
170
+ if (impl->procedureArgs.find(procCode) != impl->procedureArgs.cend()) {
171
+ const auto &procedure = impl->procedureArgs[procCode];
172
+
173
+ if (std::find(procedure.begin(), procedure.end(), argName) != procedure.end())
174
+ return;
175
+ }
176
177
impl->procedureArgs[procCode].push_back(argName);
178
}
179
0 commit comments