Commit 4a71f065 authored by Kenneth Moreland's avatar Kenneth Moreland
Browse files

COMP: Enums in generated header should not end with a comma.

parent ffbbd0bf
......@@ -543,6 +543,7 @@ static void WriteClassDeclarationGuts(ostream &hfile, int type)
if (cExts != consts.end())
{
hfile << " enum " << cExts->first.name << "_consts {" << endl;
bool wroteFirst = false;
for (list<Constant>::iterator iconst = cExts->second.begin();
iconst != cExts->second.end(); iconst++)
......@@ -559,8 +560,15 @@ static void WriteClassDeclarationGuts(ostream &hfile, int type)
iconst->value ) )
== ConstantsAlreadyWritten.end() )
{
hfile << " " << iconst->name << " = " << iconst->value
<< "," << endl;
if (wroteFirst)
{
hfile << "," << endl;
}
else
{
wroteFirst = true;
}
hfile << " " << iconst->name << " = " << iconst->value;
ConstantsAlreadyWritten.insert( make_pair( iconst->name,
iconst->value ) );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment