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) ...@@ -543,6 +543,7 @@ static void WriteClassDeclarationGuts(ostream &hfile, int type)
if (cExts != consts.end()) if (cExts != consts.end())
{ {
hfile << " enum " << cExts->first.name << "_consts {" << endl; hfile << " enum " << cExts->first.name << "_consts {" << endl;
bool wroteFirst = false;
for (list<Constant>::iterator iconst = cExts->second.begin(); for (list<Constant>::iterator iconst = cExts->second.begin();
iconst != cExts->second.end(); iconst++) iconst != cExts->second.end(); iconst++)
...@@ -559,8 +560,15 @@ static void WriteClassDeclarationGuts(ostream &hfile, int type) ...@@ -559,8 +560,15 @@ static void WriteClassDeclarationGuts(ostream &hfile, int type)
iconst->value ) ) iconst->value ) )
== ConstantsAlreadyWritten.end() ) == ConstantsAlreadyWritten.end() )
{ {
hfile << " " << iconst->name << " = " << iconst->value if (wroteFirst)
<< "," << endl; {
hfile << "," << endl;
}
else
{
wroteFirst = true;
}
hfile << " " << iconst->name << " = " << iconst->value;
ConstantsAlreadyWritten.insert( make_pair( iconst->name, ConstantsAlreadyWritten.insert( make_pair( iconst->name,
iconst->value ) ); 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