From a5e09cfd71675a97bee48c5839e2ff328ca3dc7d Mon Sep 17 00:00:00 2001
From: Cyrille Valladeau <cyrille.valladeau@c-s.fr>
Date: Wed, 9 Nov 2011 16:56:49 +0100
Subject: [PATCH] ENH: invert bool return philosophy (true if OK)

---
 Code/ApplicationEngine/otbWrapperInputImageListParameter.cxx    | 2 +-
 Code/ApplicationEngine/otbWrapperInputImageParameter.cxx        | 2 +-
 .../otbWrapperInputVectorDataListParameter.cxx                  | 2 +-
 Code/ApplicationEngine/otbWrapperInputVectorDataParameter.cxx   | 2 +-
 .../Wrappers/QtWidget/otbWrapperQtWidgetInputImageParameter.cxx | 2 +-
 .../QtWidget/otbWrapperQtWidgetInputVectorDataParameter.cxx     | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Code/ApplicationEngine/otbWrapperInputImageListParameter.cxx b/Code/ApplicationEngine/otbWrapperInputImageListParameter.cxx
index ebcea32ed5..723278985f 100644
--- a/Code/ApplicationEngine/otbWrapperInputImageListParameter.cxx
+++ b/Code/ApplicationEngine/otbWrapperInputImageListParameter.cxx
@@ -56,7 +56,7 @@ InputImageListParameter::SetListFromFileName(const std::vector<std::string> & fi
         {
         reader->UpdateOutputInformation();
         }
-      catch(itk::ExceptionObject & err)
+      catch(itk::ExceptionObject & /*err*/)
         {
         this->ClearValue();
         isOk = false;
diff --git a/Code/ApplicationEngine/otbWrapperInputImageParameter.cxx b/Code/ApplicationEngine/otbWrapperInputImageParameter.cxx
index f55f384189..13286b214f 100644
--- a/Code/ApplicationEngine/otbWrapperInputImageParameter.cxx
+++ b/Code/ApplicationEngine/otbWrapperInputImageParameter.cxx
@@ -56,7 +56,7 @@ InputImageParameter::SetFromFileName(const std::string& filename)
       {
       reader->UpdateOutputInformation();
       }
-    catch(itk::ExceptionObject & err)
+    catch(itk::ExceptionObject & /*err*/)
       {
       return false;
       }
diff --git a/Code/ApplicationEngine/otbWrapperInputVectorDataListParameter.cxx b/Code/ApplicationEngine/otbWrapperInputVectorDataListParameter.cxx
index 5c7926ab54..d4db137fdf 100644
--- a/Code/ApplicationEngine/otbWrapperInputVectorDataListParameter.cxx
+++ b/Code/ApplicationEngine/otbWrapperInputVectorDataListParameter.cxx
@@ -106,7 +106,7 @@ InputVectorDataListParameter::AddFromFileName(const std::string & filename)
       {
       reader->UpdateOutputInformation();
       }
-    catch(itk::ExceptionObject & err)
+    catch(itk::ExceptionObject & /*err*/)
       {
       return false;
       }
diff --git a/Code/ApplicationEngine/otbWrapperInputVectorDataParameter.cxx b/Code/ApplicationEngine/otbWrapperInputVectorDataParameter.cxx
index 0766ecab58..194e061846 100644
--- a/Code/ApplicationEngine/otbWrapperInputVectorDataParameter.cxx
+++ b/Code/ApplicationEngine/otbWrapperInputVectorDataParameter.cxx
@@ -51,7 +51,7 @@ InputVectorDataParameter::SetFromFileName(const std::string& filename)
       {
       reader->UpdateOutputInformation();
       }
-    catch(itk::ExceptionObject & err)
+    catch(itk::ExceptionObject & /*err*/)
       {
       return false;
       }
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputImageParameter.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputImageParameter.cxx
index d791dceb19..e5d9b47d01 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputImageParameter.cxx
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputImageParameter.cxx
@@ -85,7 +85,7 @@ bool QtWidgetInputImageParameter::SetFileName(const QString& value)
 {
   bool res = true;
   // save value
-  if(m_InputImageParam->SetFromFileName(value.toStdString()) == false )
+  if(m_InputImageParam->SetFromFileName(value.toStdString()) == true )
     {
     // notify of value change
     QString key( QString::fromStdString(m_InputImageParam->GetKey()) );
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputVectorDataParameter.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputVectorDataParameter.cxx
index e57ea4e715..703cbe7e1c 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputVectorDataParameter.cxx
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputVectorDataParameter.cxx
@@ -85,7 +85,7 @@ bool QtWidgetInputVectorDataParameter::SetFileName(const QString& value)
 {
   bool res = true;
   // save value
-  if(m_InputVectorDataParam->SetFromFileName(value.toStdString()) == false )
+  if(m_InputVectorDataParam->SetFromFileName(value.toStdString()) == true )
     {
     // notify of value change
     QString key( QString::fromStdString(m_InputVectorDataParam->GetKey()) );
-- 
GitLab