Skip to content

Commit

Permalink
tidy: Convert ROUNDUP macro into a static constexpr function.
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxdude42 committed Jul 10, 2022
1 parent 6f46a22 commit ce5cb96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mythtv/programs/mythcommflag/HistogramAnalyzer.cpp
Expand Up @@ -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)
{
Expand All @@ -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;
Expand Down

0 comments on commit ce5cb96

Please sign in to comment.