From e5f029789167565aa352902406b29db26008b286 Mon Sep 17 00:00:00 2001 From: AKMaily Date: Wed, 16 Oct 2024 13:52:01 +0200 Subject: [PATCH] Testing: Int to double --- src/handler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handler.cpp b/src/handler.cpp index 41fd9378..1beeb111 100644 --- a/src/handler.cpp +++ b/src/handler.cpp @@ -381,7 +381,7 @@ void AddPlotFromFile(fs::path &filePath) { return; } - std::unordered_map aggregated_data; + std::map aggregated_data; std::vector x_values; @@ -397,7 +397,7 @@ void AddPlotFromFile(fs::path &filePath) { for (size_t i = 0; i < x_values.size(); ++i) { if (x_values[i] >= 1 && x_values[i] <= 12500) { // only fre between 1 and 12500 hz as well as rounded freq - int rounded_x = static_cast(std::round(x_values[i])); + double rounded_x = std::round(x_values[i]); if (aggregated_data.find(rounded_x) != aggregated_data.end()) { aggregated_data[rounded_x] += y_values[i];