<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><font style="font-size: 12pt;" face="Calibri" size="3"><span style="font-size:12pt"><span dir="ltr">The
 author states that the comma was intentional.&nbsp; Obviously it's not about
 the time it takes to remove it.&nbsp; I can see a good reason why the comma 
is there.&nbsp; My approach to these kind of thing is typically to end a enum with something like, for this 
case, AlignInvalid=0xFFFF.<br><br>Xiaofeng<br></span></span></font><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">Date: Sat, 18 Aug 2012 03:38:03 +0000<br>From: trevorirons@gmail.com<br>To: david.gobbi@gmail.com<br>CC: vtkusers@vtk.org<br>Subject: Re: [vtkusers] small bug report, extra comma in enum<br><br>arguably the email was more work... <br><br>I know it's now a big deal, but I like compiling with pedantic and I'm always hit with this. Although it's the *only* warning I see (though not very comprehensive coverage) in VTK. So good on all the VTK developers. Thanks.<br>
<br clear="all">-- Trevor<br><br>
<br><br><div class="ecxgmail_quote">On 18 August 2012 03:29, David Gobbi <span dir="ltr">&lt;<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex">
<div class="ecxHOEnZb"><div class="h5">On Fri, Aug 17, 2012 at 8:23 PM, John Drescher &lt;<a href="mailto:drescherjm@gmail.com">drescherjm@gmail.com</a>&gt; wrote:<br>
&gt; On Fri, Aug 17, 2012 at 10:19 PM, Trevor Irons &lt;<a href="mailto:trevorirons@gmail.com">trevorirons@gmail.com</a>&gt; wrote:<br>
&gt;&gt; When I compile using gcc on pedantic I've been bothered by a warning for<br>
&gt;&gt; years. Was hoping someone with commit access could spend about 12 seconds<br>
&gt;&gt; and fix this.<br>
&gt;&gt;<br>
&gt;&gt; The warning reads<br>
&gt;&gt; In file included from external/matplot/matplot.h:40:0,<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;from<br>
&gt;&gt; /home/tirons/src/Merlin/include/snmrinversion1damp.h:45,<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;from<br>
&gt;&gt; /home/tirons/src/Merlin/unittest/utsnmrinversion1dgmrsimul.cpp:40:<br>
&gt;&gt; /usr/local/include/vtk-6.0/vtkXYPlotActor.h:395:28: warning: comma at end of<br>
&gt;&gt; enumerator list [-pedantic]<br>
&gt;&gt;<br>
&gt;&gt; In vtkXYPlotActor.h line 395 there is an extra comma :<br>
&gt;&gt;<br>
&gt;&gt; enum Alignment {<br>
&gt;&gt; &nbsp; AlignLeft = 0x1,<br>
&gt;&gt; &nbsp; AlignRight = 0x2,<br>
&gt;&gt; &nbsp; AlignHCenter = 0x4,<br>
&gt;&gt; &nbsp; AlignTop = 0x10,<br>
&gt;&gt; &nbsp; AlignBottom = 0x20,<br>
&gt;&gt; &nbsp; AlignVCenter = 0x40,<br>
&gt;&gt; &nbsp; AlignAxisLeft = 0x100,<br>
&gt;&gt; &nbsp; AlignAxisRight = 0x200,<br>
&gt;&gt; &nbsp; AlignAxisHCenter = 0x400,<br>
&gt;&gt; &nbsp; AlignAxisTop = 0x1000,<br>
&gt;&gt; &nbsp; AlignAxisBottom = 0x2000,<br>
&gt;&gt; &nbsp; AlignAxisVCenter = 0x4000, &nbsp; &nbsp; &nbsp; &nbsp; &lt;-- Extra comma right here<br>
&gt;&gt; };<br>
&gt;&gt;<br>
&gt;&gt; I would really appreciate it if someone with commit privileges could remove<br>
&gt;&gt; this.<br>
&gt;&gt;<br>
&gt;<br>
&gt; Isn't that legal in c++? I intentionally make my enums that way..<br>
<br>
</div></div>It was illegal until C++11, though compilers have been lax about it.<br>
So, yes, the extra comma should be removed but I've already<br>
spent more than 12 seconds just typing this email...<br>
<br>
Trailing commas in initializer lists have always been legal, though.<br>
<span class="ecxHOEnZb"><font color="#888888"><br>
&nbsp;- David<br>
</font></span></blockquote></div><br>
<br>_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers</div>                                               </div></body>
</html>