From 585cf377edfaba52e69e26a508be89cfaefaf083 Mon Sep 17 00:00:00 2001 From: elsid Date: Mon, 22 May 2023 14:32:08 +0200 Subject: [PATCH] Use bool instead of std::stringstream::view view is not supported by libc++ used for macOS builds. --- apps/openmw/mwgui/statswindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/statswindow.cpp b/apps/openmw/mwgui/statswindow.cpp index f00de27012..c0789eaf2b 100644 --- a/apps/openmw/mwgui/statswindow.cpp +++ b/apps/openmw/mwgui/statswindow.cpp @@ -342,16 +342,18 @@ namespace MWGui std::string detailText; std::stringstream detail; + bool first = true; for (int attribute = 0; attribute < ESM::Attribute::Length; ++attribute) { float mult = PCstats.getLevelupAttributeMultiplier(attribute); mult = std::min(mult, 100 - PCstats.getAttribute(attribute).getBase()); if (mult > 1) { - if (!detail.view().empty()) + if (!first) detail << '\n'; detail << "#{" << MyGUI::TextIterator::toTagsString(ESM::Attribute::sGmstAttributeIds[attribute]) << "} x" << MyGUI::utility::toString(mult); + first = false; } } detailText = MyGUI::LanguageManager::getInstance().replaceTags(detail.str());