Skip to content
Snippets Groups Projects
Commit 0ed8bcc3 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

COMP: fix BoolParameter class

parent 6d75dddd
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,9 @@
#ifndef otbWrapperBoolParameter_h
#define otbWrapperBoolParameter_h
#include "otbWrapperParameter.h"
#include "OTBApplicationEngineExport.h"
namespace otb
{
namespace Wrapper
......
......@@ -52,6 +52,7 @@ set( OTBApplicationEngine_SRC
otbWrapperStringListParameter.cxx
otbWrapperAbstractParameterList.cxx
otbWrapperParameterList.cxx
otbWrapperBoolParameter.cxx
otbLogger.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");
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment