[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdepimlibs/kioslave/imap4
From:       Allen Winter <winter () kde ! org>
Date:       2008-05-07 17:01:24
Message-ID: 200805071301.25364.winter () kde ! org
[Download RAW message or body]

On Tuesday 06 May 2008 14:47:59 Jakub Stachowski wrote:
> SVN commit 804674 by qbast:
>
> Use static const instead of #define
>
Curious minds want to know. :)
Is this because we want to avoid the preprocessor potentially
screwing things up?  Is this something Krazy should check for?


>
>
>  M  +3 -3      imap4.cpp
>
>
> --- trunk/KDE/kdepimlibs/kioslave/imap4/imap4.cpp #804673:804674
> @@ -95,8 +95,8 @@
>
>  #define IMAP_PROTOCOL "imap"
>  #define IMAP_SSL_PROTOCOL "imaps"
> -#define IMAP_PORT 143
> -#define IMAPS_PORT 993
> +static const int ImapPort = 143;
> +static const int ImapsPort = 993;
>
>  using namespace KIO;
>
> @@ -634,7 +634,7 @@
>        closeConnection ();
>      myHost = _host;
>      if (_port == 0)
> -        myPort = (mySSL) ? IMAPS_PORT : IMAP_PORT;
> +        myPort = (mySSL) ? ImapsPort : ImapPort;
>      else
>          myPort = _port;
>      myUser = _user;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic