From d1c867b3912194be2ddc2855b8acbbec48222663 Mon Sep 17 00:00:00 2001 From: "Ralph J. Steinhagen" Date: Mon, 2 Dec 2024 18:31:43 +0100 Subject: [PATCH] fixed tag index check in ImChartMonitor Signed-off-by: Ralph J. Steinhagen --- .../testing/include/gnuradio-4.0/testing/ImChartMonitor.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blocks/testing/include/gnuradio-4.0/testing/ImChartMonitor.hpp b/blocks/testing/include/gnuradio-4.0/testing/ImChartMonitor.hpp index f4c10d0e..d93a5e3c 100644 --- a/blocks/testing/include/gnuradio-4.0/testing/ImChartMonitor.hpp +++ b/blocks/testing/include/gnuradio-4.0/testing/ImChartMonitor.hpp @@ -71,9 +71,9 @@ struct ImChartMonitor : public Block, BlockingIO, Drawa std::vector reversedY(_historyBufferY.rbegin(), _historyBufferY.rend()); std::vector reversedTag(_historyBufferX.size()); if constexpr (std::is_floating_point_v) { - std::transform(_historyBufferTags.rbegin(), _historyBufferTags.rend(), _historyBufferY.rbegin(), reversedTag.begin(), [](const Tag& tag, const T& yValue) { return tag.index < 0 ? std::numeric_limits::quiet_NaN() : yValue; }); + std::transform(_historyBufferTags.rbegin(), _historyBufferTags.rend(), _historyBufferY.rbegin(), reversedTag.begin(), [](const Tag& tag, const T& yValue) { return tag.map.empty() ? std::numeric_limits::quiet_NaN() : yValue; }); } else { - std::transform(_historyBufferTags.rbegin(), _historyBufferTags.rend(), _historyBufferY.rbegin(), reversedTag.begin(), [](const Tag& tag, const T& yValue) { return tag.index < 0 ? std::numeric_limits::lowest() : yValue; }); + std::transform(_historyBufferTags.rbegin(), _historyBufferTags.rend(), _historyBufferY.rbegin(), reversedTag.begin(), [](const Tag& tag, const T& yValue) { return tag.map.empty() ? std::numeric_limits::lowest() : yValue; }); } auto adjustRange = [](T min, T max) {