1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00

Use bool instead of std::stringstream::view

view is not supported by libc++ used for macOS builds.
This commit is contained in:
elsid 2023-05-22 14:32:08 +02:00
parent 6f8c152487
commit 585cf377ed
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

View File

@ -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());