From a1d4d291d14a960b8551fb27fd15844a03c45ad8 Mon Sep 17 00:00:00 2001 From: mjn-mixael Date: Wed, 28 Aug 2024 18:57:32 -0500 Subject: [PATCH] Clang the conquerer strikes again --- code/graphics/software/FontManager.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/code/graphics/software/FontManager.cpp b/code/graphics/software/FontManager.cpp index fbf41a8c22f..7185f377cae 100644 --- a/code/graphics/software/FontManager.cpp +++ b/code/graphics/software/FontManager.cpp @@ -87,14 +87,10 @@ namespace font bool FontManager::hasScalingFonts() { - for (auto& font : fonts) { + return std::any_of(fonts.begin(), fonts.end(), [](const std::unique_ptr& font) { const auto& thisFont = font.get(); - if (thisFont->getType() == NVG_FONT && thisFont->getScaleBehavior()) { - return true; - } - } - - return false; + return thisFont->getType() == NVG_FONT && thisFont->getScaleBehavior(); + }); } int FontManager::numberOfFonts()