From 0eee78cb7631a3d8d0d6685fda487de2a29ad5e7 Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Sat, 25 Apr 2015 01:43:37 +0200 Subject: [PATCH] Fix enum define that conflicts with system macro on mac os --- tools/clitkPadImageGenericFilter.cxx | 6 +++--- tools/clitkPadImageGenericFilter.h | 10 +++------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/tools/clitkPadImageGenericFilter.cxx b/tools/clitkPadImageGenericFilter.cxx index 49d4075..8477a35 100644 --- a/tools/clitkPadImageGenericFilter.cxx +++ b/tools/clitkPadImageGenericFilter.cxx @@ -155,7 +155,7 @@ namespace clitk SpacingType spacing = input->GetSpacing(), like_spacing = like_image->GetSpacing(); if (spacing != like_spacing) { std::cerr << "Like-image must have same spacing as input: " << spacing << " " << like_spacing << std::endl; - return ERR_NOT_SAME_SPACING; + return PAD_ERR_NOT_SAME_SPACING; } SizeType size = input->GetLargestPossibleRegion().GetSize(), like_size = like_image->GetLargestPossibleRegion().GetSize(); @@ -175,7 +175,7 @@ namespace clitk if (auxl < 0 || auxu < 0) { std::cerr << "Like-image's bounding box must be larger than input's" << std::endl; - return ERR_NOT_LIKE_LARGER; + return PAD_ERR_NOT_LIKE_LARGER; } padLower[i] = (PadBoundType)auxl; @@ -184,7 +184,7 @@ namespace clitk if (mArgsInfo.verbose_flag) std::cout << "PadLike - OUT" << std::endl; - return ERR_SUCCESS; + return PAD_ERR_SUCCESS; } } //end clitk diff --git a/tools/clitkPadImageGenericFilter.h b/tools/clitkPadImageGenericFilter.h index 208b9f9..429d203 100644 --- a/tools/clitkPadImageGenericFilter.h +++ b/tools/clitkPadImageGenericFilter.h @@ -24,10 +24,6 @@ #include "clitkImageToImageGenericFilter.h" #include "clitkPadImage_ggo.h" -#ifdef ERR_SUCCESS -# undef ERR_SUCCESS -#endif - //-------------------------------------------------------------------- namespace clitk { @@ -38,9 +34,9 @@ namespace clitk public: enum { - ERR_SUCCESS = 0, - ERR_NOT_SAME_SPACING = -1, - ERR_NOT_LIKE_LARGER = -2 + PAD_ERR_SUCCESS = 0, + PAD_ERR_NOT_SAME_SPACING = -1, + PAD_ERR_NOT_LIKE_LARGER = -2 }; //-------------------------------------------------------------------- -- 2.47.1