If we always return a valid pointer, we need to look
at the channel type to figure out if this data is
supposed to be valid or not. This isn't useful.
if (channel_type_ == AnalogChannel)
return dynamic_pointer_cast<data::Analog>(data_);
else
- return shared_ptr<data::Analog>();
+ return nullptr;
}
shared_ptr<data::Logic> SignalBase::logic_data() const
if (channel_type_ == LogicChannel)
return dynamic_pointer_cast<data::Logic>(data_);
else
- return shared_ptr<data::Logic>();
+ return nullptr;
}
#ifdef ENABLE_DECODE