Commit 39b39372 authored by Alexander Wiebel's avatar Alexander Wiebel
Browse files

[FIX] In C++11, shared_ptr can't be implicitly converted to a bool

parent 7187115b
...@@ -90,7 +90,7 @@ void WMDetTract2GPConvert::moduleMain() ...@@ -90,7 +90,7 @@ void WMDetTract2GPConvert::moduleMain()
boost::shared_ptr< WDataSetDTI > tensors = m_tensorIC->getData(); boost::shared_ptr< WDataSetDTI > tensors = m_tensorIC->getData();
// Demain Wasserman said, using tensors is not realy worth its effort // Demain Wasserman said, using tensors is not realy worth its effort
// bool dataValid = tracts && tensors; // bool dataValid = tracts && tensors;
bool dataValid = tracts; bool dataValid = static_cast< bool >( tracts );
if( !dataValid ) if( !dataValid )
{ {
continue; continue;
......
...@@ -378,14 +378,14 @@ void WMTransferCalc::moduleMain() ...@@ -378,14 +378,14 @@ void WMTransferCalc::moduleMain()
bool dataChanged = ( m_inputData->getData() != m_dataSet ); bool dataChanged = ( m_inputData->getData() != m_dataSet );
bool additionalData = ( m_inputFA->getData() != m_FAdataSet ); bool additionalData = ( m_inputFA->getData() != m_FAdataSet );
bool newDerivative = ( m_inputDerivation->getData() != m_deriDataSet ); bool newDerivative = ( m_inputDerivation->getData() != m_deriDataSet );
bool dataValid = ( m_dataSet ); bool dataValid = static_cast< bool >( m_dataSet );
m_DeriIsValid = ( m_deriDataSet ); m_DeriIsValid = static_cast< bool >( m_deriDataSet );
m_FAisValid = ( m_FAdataSet ); m_FAisValid = static_cast< bool >( m_FAdataSet );
if( dataChanged ) // main data, compulsory if( dataChanged ) // main data, compulsory
{ {
m_dataSet = m_inputData->getData(); m_dataSet = m_inputData->getData();
dataValid = ( m_dataSet ); dataValid = static_cast< bool >( m_dataSet );
debugLog() << "New Data!"; debugLog() << "New Data!";
if( !dataValid ) if( !dataValid )
...@@ -409,7 +409,7 @@ void WMTransferCalc::moduleMain() ...@@ -409,7 +409,7 @@ void WMTransferCalc::moduleMain()
if( newDerivative ) // optional: dataset with derivated data if( newDerivative ) // optional: dataset with derivated data
{ {
m_deriDataSet = m_inputDerivation->getData(); m_deriDataSet = m_inputDerivation->getData();
m_DeriIsValid = ( m_deriDataSet ); m_DeriIsValid = static_cast< bool >( m_deriDataSet );
debugLog() << "New Derivated Data!"; debugLog() << "New Derivated Data!";
if( !m_DeriIsValid ) if( !m_DeriIsValid )
...@@ -444,7 +444,7 @@ void WMTransferCalc::moduleMain() ...@@ -444,7 +444,7 @@ void WMTransferCalc::moduleMain()
if( additionalData ) // optional: fractional anisotropy data if( additionalData ) // optional: fractional anisotropy data
{ {
m_FAdataSet = m_inputFA->getData(); m_FAdataSet = m_inputFA->getData();
m_FAisValid = ( m_FAdataSet ); m_FAisValid = static_cast< bool >( m_FAdataSet );
debugLog() << "New FA Data!"; debugLog() << "New FA Data!";
if( !m_FAisValid ) if( !m_FAisValid )
......
...@@ -126,7 +126,7 @@ void WMSliceContext::moduleMain() ...@@ -126,7 +126,7 @@ void WMSliceContext::moduleMain()
// To query whether an input was updated, simply ask the input: // To query whether an input was updated, simply ask the input:
bool dataUpdated = m_fiberInput->updated(); bool dataUpdated = m_fiberInput->updated();
boost::shared_ptr< const WDataSetFibers > fibers( m_fiberInput->getData() ); boost::shared_ptr< const WDataSetFibers > fibers( m_fiberInput->getData() );
bool dataValid = fibers; bool dataValid = static_cast< bool >( fibers );
if( !( dataValid && dataUpdated ) ) if( !( dataValid && dataUpdated ) )
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment