From: <sv...@ww...> - 2004-12-07 08:28:30
|
Author: mkrose Date: 2004-12-07 00:28:24 -0800 (Tue, 07 Dec 2004) New Revision: 1365 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc_gen.py Log: Tweak trc to suppress warnings under msvc. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1365 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-12-07 08:20:33 UTC (rev 1364) +++ trunk/CSP/SimData/CHANGES.current 2004-12-07 08:28:24 UTC (rev 1365) @@ -3,6 +3,8 @@ 2004-12-06: onsight * Define correct 64-bit integer suffixes for msvc. + * Separate 64-bit definitions from other compiler definitions. + * Tweak trc to suppress warnings under msvc. 2004-12-05: onsight * Fix a couple minor warnings under msvc. Modified: trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc_gen.py =================================================================== --- trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc_gen.py 2004-12-07 08:20:33 UTC (rev 1364) +++ trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc_gen.py 2004-12-07 08:28:24 UTC (rev 1365) @@ -467,24 +467,30 @@ if child.required: child.writeSerializeReader(output) output(child.getHasFlag().getSetString()) - output('for (int tag = reader.nextTag(); tag != 0; tag = reader.nextTag()) {') - output.indent() - output('switch (tag) {') - output.indent() + has_tags = 0 for child in self.children: - if child.required: continue - output('case TAG_%s: {' % child.getId()) + if not child.required: + has_tags = 1 + break + if has_tags: + output('for (int tag = reader.nextTag(); tag != 0; tag = reader.nextTag()) {') output.indent() - child.writeSerializeReader(output) - output(child.getHasFlag().getSetString()) - output('break;') + output('switch (tag) {') + output.indent() + for child in self.children: + if child.required: continue + output('case TAG_%s: {' % child.getId()) + output.indent() + child.writeSerializeReader(output) + output(child.getHasFlag().getSetString()) + output('break;') + output.dedent() + output('}') + output('default: break;') output.dedent() output('}') - output('default: break;') - output.dedent() - output('}') - output.dedent() - output('}') + output.dedent() + output('}') output('reader.endCompound();') output.dedent() output('}\n') |