From ce5cb96fab10bb7687184aeeeab7d72aec16ec6d Mon Sep 17 00:00:00 2001 From: David Hampton Date: Tue, 5 Jul 2022 09:12:33 -0400 Subject: [PATCH] tidy: Convert ROUNDUP macro into a static constexpr function. --- mythtv/programs/mythcommflag/HistogramAnalyzer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mythtv/programs/mythcommflag/HistogramAnalyzer.cpp b/mythtv/programs/mythcommflag/HistogramAnalyzer.cpp index 64edb20e083..00ce91d9011 100644 --- a/mythtv/programs/mythcommflag/HistogramAnalyzer.cpp +++ b/mythtv/programs/mythcommflag/HistogramAnalyzer.cpp @@ -256,6 +256,8 @@ HistogramAnalyzer::setLogoState(TemplateFinder *finder) m_logoFinder = finder; } +static constexpr int ROUNDUP(int a, int b) { return (a + b - 1) / b * b; } + enum FrameAnalyzer::analyzeFrameResult HistogramAnalyzer::analyzeFrame(const MythVideoFrame *frame, long long frameno) { @@ -275,7 +277,6 @@ HistogramAnalyzer::analyzeFrame(const MythVideoFrame *frame, long long frameno) */ static constexpr int kRInc = 4; static constexpr int kCInc = 4; -#define ROUNDUP(a,b) (((a) + (b) - 1) / (b) * (b)) int pgmwidth = 0; int pgmheight = 0;