Hi

I have updated
http://mixxx.org/wiki/doku.php/coding_guidelines?&#auto
according to our discussion.
It is still a draft. Lets tweak it until we have a commitment.

I am unsure what is the recommended version for our own typedefs:

CSAMPLE sample = 0.0;
auto sample = (CSAMPLE)0.0;
auto sample = CSAMPLE(0.0);
auto sample = static_cast<CSAMPLE>(0.0);

And object inits
auto string = QString("Hello world!");
QString string("Hello world!");

Any preferences?

Kind regards,

Daniel




Am 05.06.2015 um 15:27 schrieb Owen Williams:
> On Fri, 2015-06-05 at 08:14 -0400, RJ Ryan wrote:
>
>> Which can pretty much be summarized as "use auto to prevent repeating
>> yourself".
>
> My rule of thumb is, use auto when the type is long AND easily
> understandable from the context.  So don't use auto instead of QString
> "just because," but do use auto instead of blah<foo>::const_iterator.
> And for range-based for loops, please *always* use auto when iterating
> through a map, because it's easy to get the types wrong.
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Get Mixxx, the #1 Free MP3 DJ Mixing software Today
> http://mixxx.org
>
>
> Mixxx-devel mailing list
> Mixxx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mixxx-devel


------------------------------------------------------------------------------
_______________________________________________
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org


Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to