From 4ad60540e00fdc8f03aed7fb0b6f69dd83a8b121 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 27 Sep 2026 20:57:42 +0000 Subject: [PATCH] Make SpectrumVis limits constexpr Co-authored-by: srcejon <57259258+srcejon@users.noreply.github.com> --- sdrbase/dsp/spectrumvis.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdrbase/dsp/spectrumvis.h b/sdrbase/dsp/spectrumvis.h index e11ef2bb0..325402d90 100644 --- a/sdrbase/dsp/spectrumvis.h +++ b/sdrbase/dsp/spectrumvis.h @@ -207,7 +207,7 @@ public: int webapiSpectrumDataGet(int bins, qint64 startFrequency, qint64 stopFrequency, const QString& reduce, SWGSDRangel::SWGGLSpectrumData& response, QString& errorMessage) const; - static const int m_maxDataBins = 4096; //!< A reduced spectrum any larger is not a summary + static constexpr int m_maxDataBins = 4096; //!< A reduced spectrum any larger is not a summary //!< Statistics over the spectrum history the display keeps for scrolling: per bin max, mean //!< and occupancy, and the signals found. thresholdDb is above the measured floor @@ -216,7 +216,7 @@ public: //!< The same history as a greyscale PNG, newest row at the bottom, bins wide and one row per pixel up to maxRows int webapiSpectrumHistoryImageGet(double seconds, int bins, qint64 startFrequency, qint64 stopFrequency, int maxRows, QByteArray& png, QJsonObject& description, QString& errorMessage) const; - static const int m_maxHistoryRows = 4000; + static constexpr int m_maxHistoryRows = 4000; private: struct ReducedHistory;