1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-01 11:09:42 +00:00

Merge branch 'fix_libc++_build' into 'master'

Use bool instead of std::stringstream::view

See merge request OpenMW/openmw!3045
This commit is contained in:
Evil Eye 2023-05-22 14:12:27 +00:00
commit 45c84a2426

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