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

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

parent 7187115b
......@@ -90,7 +90,7 @@ void WMDetTract2GPConvert::moduleMain()
boost::shared_ptr< WDataSetDTI > tensors = m_tensorIC->getData();
// Demain Wasserman said, using tensors is not realy worth its effort
// bool dataValid = tracts && tensors;
bool dataValid = tracts;
bool dataValid = static_cast< bool >( tracts );
if( !dataValid )
{
continue;
......
......@@ -378,14 +378,14 @@ void WMTransferCalc::moduleMain()
bool dataChanged = ( m_inputData->getData() != m_dataSet );
bool additionalData = ( m_inputFA->getData() != m_FAdataSet );
bool newDerivative = ( m_inputDerivation->getData() != m_deriDataSet );
bool dataValid = ( m_dataSet );
m_DeriIsValid = ( m_deriDataSet );
m_FAisValid = ( m_FAdataSet );
bool dataValid = static_cast< bool >( m_dataSet );
m_DeriIsValid = static_cast< bool >( m_deriDataSet );
m_FAisValid = static_cast< bool >( m_FAdataSet );
if( dataChanged ) // main data, compulsory
{
m_dataSet = m_inputData->getData();
dataValid = ( m_dataSet );
dataValid = static_cast< bool >( m_dataSet );
debugLog() << "New Data!";
if( !dataValid )
......@@ -409,7 +409,7 @@ void WMTransferCalc::moduleMain()
if( newDerivative ) // optional: dataset with derivated data
{
m_deriDataSet = m_inputDerivation->getData();
m_DeriIsValid = ( m_deriDataSet );
m_DeriIsValid = static_cast< bool >( m_deriDataSet );
debugLog() << "New Derivated Data!";
if( !m_DeriIsValid )
......@@ -444,7 +444,7 @@ void WMTransferCalc::moduleMain()
if( additionalData ) // optional: fractional anisotropy data
{
m_FAdataSet = m_inputFA->getData();
m_FAisValid = ( m_FAdataSet );
m_FAisValid = static_cast< bool >( m_FAdataSet );
debugLog() << "New FA Data!";
if( !m_FAisValid )
......
......@@ -126,7 +126,7 @@ void WMSliceContext::moduleMain()
// To query whether an input was updated, simply ask the input:
bool dataUpdated = m_fiberInput->updated();
boost::shared_ptr< const WDataSetFibers > fibers( m_fiberInput->getData() );
bool dataValid = fibers;
bool dataValid = static_cast< bool >( fibers );
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