← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH 2/2] Fix preprocessor logic

 

Committed in 6471. Thank you.

On Thu, Jan 14, 2016 at 07:21:32PM +0100, Simon Richter wrote:
> 
> The C++ preprocessor is actually not required to process "true" and "false"
> correctly. This works in C if <stdbool.h> is included, because these are
> then macros themselves, and resolved correctly, but C++ requires them to be
> keywords, so no such macros exist, and the preprocessor can treat both as
> undefined/zero.
> ---
>  pcbnew/files.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

> diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp
> index 88bcf37..dd7feec 100644
> --- a/pcbnew/files.cpp
> +++ b/pcbnew/files.cpp
> @@ -56,8 +56,8 @@
>  #include <wx/stdpaths.h>
>  
>  
> -//#define     USE_INSTRUMENTATION     true
> -#define     USE_INSTRUMENTATION     false
> +//#define     USE_INSTRUMENTATION     1
> +#define     USE_INSTRUMENTATION     0
>  
>  
>  static const wxChar backupSuffix[]   = wxT( "-bak" );

> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp



References