From e6595c72aabe129ea205bdf3c10bdb354798a351 Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Sat, 11 May 2024 23:11:29 +0300 Subject: [PATCH] Fix false positive constStatement warnings --- src/fdr/fdr_engine_description.cpp | 2 +- src/parser/ComponentRepeat.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fdr/fdr_engine_description.cpp b/src/fdr/fdr_engine_description.cpp index c4f59258..6de09f92 100644 --- a/src/fdr/fdr_engine_description.cpp +++ b/src/fdr/fdr_engine_description.cpp @@ -71,7 +71,7 @@ u32 findDesiredStride(size_t num_lits, size_t min_len, size_t min_len_count) { } else if (num_lits < 5000) { // for larger but not huge sizes, go to stride 2 only if we have at // least minlen 3 - desiredStride = MIN(min_len - 1, 2); + desiredStride = std::min(min_len - 1, 2UL); } } diff --git a/src/parser/ComponentRepeat.cpp b/src/parser/ComponentRepeat.cpp index 78277108..246c395b 100644 --- a/src/parser/ComponentRepeat.cpp +++ b/src/parser/ComponentRepeat.cpp @@ -321,7 +321,7 @@ void ComponentRepeat::wireRepeats(GlushkovBuildState &bs) { } DEBUG_PRINTF("wiring up %u optional repeats\n", copies - m_min); - for (u32 rep = MAX(m_min, 1); rep < copies; rep++) { + for (u32 rep = std::max(m_min, 1U); rep < copies; rep++) { vector lasts = m_lasts[rep - 1]; if (rep != m_min) { lasts.insert(lasts.end(), optLasts.begin(), optLasts.end());