Re: [Development] Best practice for defining an integer constant

2014-02-15 Thread Mandeep Sandhu
On Fri, Feb 14, 2014 at 10:33 PM, Thiago Macieira wrote: > Em sex 14 fev 2014, às 15:59:28, Mandeep Sandhu escreveu: > > I have a need for defining an integer constant that'll be used for > > initializing a member variable of a private class. > > > > The Qt coding conventions (http://qt-project.o

Re: [Development] Best practice for defining an integer constant

2014-02-14 Thread Tony Van Eerd
> > > > The Qt coding conventions > > (http://qt-project.org/wiki/Coding-Conventions) > > recommend using an enum over 'const int'. > > > > The rationale given there is that an enum will be replaced at > > compile-time resulting in 'faster code'. Won't that be the case with > > 'const int' as well?

Re: [Development] Best practice for defining an integer constant

2014-02-14 Thread Thiago Macieira
Em sex 14 fev 2014, às 15:59:28, Mandeep Sandhu escreveu: > I have a need for defining an integer constant that'll be used for > initializing a member variable of a private class. > > The Qt coding conventions (http://qt-project.org/wiki/Coding-Conventions) > recommend using an enum over 'const in

Re: [Development] Best practice for defining an integer constant

2014-02-14 Thread Mandeep Sandhu
; -- > > Alex > -- > *From:* > development-bounces+alexander.blasche=digia@qt-project.org[development-bounces+alexander.blasche= > digia@qt-project.org] on behalf of Mandeep Sandhu [ > mandeepsandhu@gmail.com] > *Sent:* Friday, February 14, 2014

Re: [Development] Best practice for defining an integer constant

2014-02-14 Thread Blasche Alexander
-project.org] on behalf of Mandeep Sandhu [mandeepsandhu@gmail.com] Sent: Friday, February 14, 2014 11:29 To: development@qt-project.org Subject: [Development] Best practice for defining an integer constant I have a need for defining an integer constant that'll be used for initializi

[Development] Best practice for defining an integer constant

2014-02-14 Thread Mandeep Sandhu
I have a need for defining an integer constant that'll be used for initializing a member variable of a private class. The Qt coding conventions (http://qt-project.org/wiki/Coding-Conventions) recommend using an enum over 'const int'. The rationale given there is that an enum will be replaced at c