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
> >
> > 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?
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
; --
>
> 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
-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
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