<div dir="ltr">or maybe like this:<div><br></div><div><div style="font-size:12.8000001907349px"><i><font color="#0000ff">ClassName::ClassName()</font></i></div><div style="font-size:12.8000001907349px"><i><font color="#0000ff"><span style="white-space:pre-wrap">    : </span></font></i><i><font color="#0000ff">x(1)</font></i></div><div style="font-size:12.8000001907349px"><i><font color="#0000ff"><span style="white-space:pre-wrap">        , </span></font></i><i><font color="#0000ff">y(2)</font></i></div><div style="font-size:12.8000001907349px"><i><font color="#0000ff"><span style="white-space:pre-wrap">        , </span></font></i><i><font color="#0000ff">z(3)</font></i></div><div style="font-size:12.8000001907349px"><i><font color="#0000ff">{</font></i></div><div style="font-size:12.8000001907349px"><i><font color="#0000ff">}</font></i></div></div><div style="font-size:12.8000001907349px"><i><font color="#0000ff"><br></font></i></div>Benefits:<div>* Members are aligned(easy to read)</div><div>* Eazyer for adding new members to the end of the list(no need to worry about the comma to last entry)</div><div><br></div><div>br, Boris..</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 23, 2015 at 4:59 AM, Marcos Cardinot <span dir="ltr"><<a href="mailto:mcardinot@gmail.com" target="_blank">mcardinot@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello folks,<div><br></div><div>It is just a naive discussion about coding style... =D<br><div><br></div><div>According to the CodingStyle.txt:</div><div><br></div><div><i><font color="#0000ff">"- in a C++ constructor initialization list, the colon is on the same line and</font></i></div><div><i><font color="#0000ff">  continuation lines are aligned as the rule above:</font></i></div><div><i><font color="#0000ff"><br></font></i></div><div><i><font color="#0000ff"><span style="white-space:pre-wrap">    </span>ClassName::ClassName() : x(1), y(2),</font></i></div><div><i><font color="#0000ff"><span style="white-space:pre-wrap">                               </span> z(3)</font></i></div><div><i><font color="#0000ff"><span style="white-space:pre-wrap">      </span>{</font></i></div><div><i><font color="#0000ff"><span style="white-space:pre-wrap">  </span>}"</font></i></div><div><i><font color="#0000ff"><br></font></i></div><div><font color="#000000">As you know, most of the classes does not follow this rule yet, but it's fine, since it looks like a new rule =D</font></div><div><br></div><div>However, in this format, the next lines would usually require some white spaces (in order to do a correct alignment), but it might not be a good idea, because the alignment would depends on the editor...</div><div>In addition, writing many (more than one) members at the same line is less readable than writing only one...</div><div><br></div><div>My suggestion is that for this case, we should have a style in which we would never need to use white spaces...</div><div>for example:</div><div><div><i><font color="#0000ff">ClassName::ClassName() :</font></i></div><div><i><font color="#0000ff"><span style="white-space:pre-wrap">       </span></font></i><i><font color="#0000ff">x(1),</font></i></div><div><i><font color="#0000ff"><span style="white-space:pre-wrap">        </span></font></i><i><font color="#0000ff">y(2),</font></i></div><div><i><font color="#0000ff"><span style="white-space:pre-wrap">        </span></font></i><i><font color="#0000ff">z(3)</font></i></div><div><i><font color="#0000ff">{</font></i></div><div><i><font color="#0000ff">}</font></i></div></div><div><i><font color="#0000ff"><br></font></i></div><div><i><font color="#0000ff">or</font></i></div><div><i><font color="#0000ff"><br></font></i></div><div><div><i><font color="#0000ff">ClassName::ClassName()</font></i></div><div><i><font color="#0000ff"><span style="white-space:pre-wrap">      : </span></font></i><i><font color="#0000ff">x(1),</font></i></div><div><i><font color="#0000ff"><span style="white-space:pre-wrap">      </span></font></i><i><font color="#0000ff">y(2),</font></i></div><div><i><font color="#0000ff"><span style="white-space:pre-wrap">        </span></font></i><i><font color="#0000ff">z(3)</font></i></div><div><i><font color="#0000ff">{</font></i></div><div><i><font color="#0000ff">}</font></i></div></div><div><i><font color="#0000ff"><br></font></i></div>But that's just my two cents.<div><br></div><div>What do you think?</div><div><br></div><div>All the best,</div><div>Marcos</div></div></div>
<br>_______________________________________________<br>
subsurface mailing list<br>
<a href="mailto:subsurface@subsurface-divelog.org">subsurface@subsurface-divelog.org</a><br>
<a href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface" target="_blank">http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div><b><font face="arial, helvetica, sans-serif">Boris Barbulovski</font></b></div><div><font face="arial, helvetica, sans-serif"><a href="http://mkfusion.bokicsoft.com/" target="_blank">http://mkfusion.bokicsoft.com/</a></font></div><div><br></div><img src="http://www.bokicsoft.com/cv/NokiaQtCertifiedSpecialistLogo_lrg.jpg"><br></div>
</div>