* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include <libsigrokdecode/libsigrokdecode.h>
void DecoderStack::begin_decode()
{
- shared_ptr<pv::data::SignalBase> signalbase;
- shared_ptr<pv::data::Logic> data;
-
if (decode_thread_.joinable()) {
interrupt_ = true;
input_cond_.notify_one();
// We get the logic data of the first channel in the list.
// This works because we are currently assuming all
// logic signals have the same data/segment
+ pv::data::SignalBase *signalbase;
+ pv::data::Logic *data = nullptr;
+
for (const shared_ptr<decode::Decoder> &dec : stack_)
if (dec && !dec->channels().empty() &&
- ((signalbase = (*dec->channels().begin()).second)) &&
- ((data = signalbase->logic_data())))
+ ((signalbase = (*dec->channels().begin()).second.get())) &&
+ ((data = signalbase->logic_data().get())))
break;
if (!data)