mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-29 04:06:40 +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:
commit
45c84a2426
1 changed files with 3 additions and 1 deletions
|
@ -342,16 +342,18 @@ namespace MWGui
|
||||||
|
|
||||||
std::string detailText;
|
std::string detailText;
|
||||||
std::stringstream detail;
|
std::stringstream detail;
|
||||||
|
bool first = true;
|
||||||
for (int attribute = 0; attribute < ESM::Attribute::Length; ++attribute)
|
for (int attribute = 0; attribute < ESM::Attribute::Length; ++attribute)
|
||||||
{
|
{
|
||||||
float mult = PCstats.getLevelupAttributeMultiplier(attribute);
|
float mult = PCstats.getLevelupAttributeMultiplier(attribute);
|
||||||
mult = std::min(mult, 100 - PCstats.getAttribute(attribute).getBase());
|
mult = std::min(mult, 100 - PCstats.getAttribute(attribute).getBase());
|
||||||
if (mult > 1)
|
if (mult > 1)
|
||||||
{
|
{
|
||||||
if (!detail.view().empty())
|
if (!first)
|
||||||
detail << '\n';
|
detail << '\n';
|
||||||
detail << "#{" << MyGUI::TextIterator::toTagsString(ESM::Attribute::sGmstAttributeIds[attribute])
|
detail << "#{" << MyGUI::TextIterator::toTagsString(ESM::Attribute::sGmstAttributeIds[attribute])
|
||||||
<< "} x" << MyGUI::utility::toString(mult);
|
<< "} x" << MyGUI::utility::toString(mult);
|
||||||
|
first = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
detailText = MyGUI::LanguageManager::getInstance().replaceTags(detail.str());
|
detailText = MyGUI::LanguageManager::getInstance().replaceTags(detail.str());
|
||||||
|
|
Loading…
Reference in a new issue