diff --git a/Modules/Wrappers/ApplicationEngine/include/otbWrapperBoolParameter.h b/Modules/Wrappers/ApplicationEngine/include/otbWrapperBoolParameter.h index cb4991c93bf4f17308cb257e9ec982ec28adf96a..6e4c4ce3dacc9e73572487348e1760c196e16e9f 100644 --- a/Modules/Wrappers/ApplicationEngine/include/otbWrapperBoolParameter.h +++ b/Modules/Wrappers/ApplicationEngine/include/otbWrapperBoolParameter.h @@ -21,6 +21,9 @@ #ifndef otbWrapperBoolParameter_h #define otbWrapperBoolParameter_h +#include "otbWrapperParameter.h" +#include "OTBApplicationEngineExport.h" + namespace otb { namespace Wrapper diff --git a/Modules/Wrappers/ApplicationEngine/src/CMakeLists.txt b/Modules/Wrappers/ApplicationEngine/src/CMakeLists.txt index 343f9db8354ca588189b10f7fcf625413225f1e4..90853b7ede3c748b8e41f16c1b56fee904aa2d5d 100644 --- a/Modules/Wrappers/ApplicationEngine/src/CMakeLists.txt +++ b/Modules/Wrappers/ApplicationEngine/src/CMakeLists.txt @@ -52,6 +52,7 @@ set( OTBApplicationEngine_SRC otbWrapperStringListParameter.cxx otbWrapperAbstractParameterList.cxx otbWrapperParameterList.cxx + otbWrapperBoolParameter.cxx otbLogger.cxx ) diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperBoolParameter.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperBoolParameter.cxx index 92587a5ddd8edab5a362e57df99518b91e16853e..61acd2fdfa4b1042bc1246247f110a6d0070d748 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperBoolParameter.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperBoolParameter.cxx @@ -47,7 +47,7 @@ BoolParameter::SetValue(const std::string & str) std::string lowerStr; // only strings less than 10 characters expected lowerStr.reserve(10); - for (unsigned int i=0 ; i < std::min(10,str.size()) ; i++ ) + for (unsigned int i=0 ; i < std::min(10U,(unsigned int) str.size()) ; i++ ) { lowerStr.push_back(tolower(str[i])); } @@ -61,7 +61,7 @@ BoolParameter::SetValue(const std::string & str) } else { - // TODO: exception, value not a bool + itkGenericExceptionMacro(<< "Wrong value for BoolParameter (" << str << "), accepts: 0, 1, on, off, true, false"); } }