Slight refactor

release/4.3a0
dellaert 2014-05-25 13:12:48 -04:00
parent ededc01ec1
commit 4403d47865
1 changed files with 4 additions and 6 deletions

View File

@ -131,13 +131,11 @@ void ArgumentList::matlab_unwrap(FileWriter& file, int start) const {
/* ************************************************************************* */ /* ************************************************************************* */
void ArgumentList::emit_prototype(FileWriter& file, const string& name) const { void ArgumentList::emit_prototype(FileWriter& file, const string& name) const {
file.oss << name << "("; file.oss << name << "(";
unsigned int i = 0; bool first = true;
BOOST_FOREACH(Argument arg, *this) { BOOST_FOREACH(Argument arg, *this) {
if (i != size() - 1) if (!first) file.oss << ", ";
file.oss << arg.type << " " << arg.name << ", ";
else
file.oss << arg.type << " " << arg.name; file.oss << arg.type << " " << arg.name;
i++; first = false;
} }
file.oss << ")"; file.oss << ")";
} }