1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 09:45:36 +00:00

Merge branch 'move' into 'master'

Move local variables in GUI code

See merge request OpenMW/openmw!3758
This commit is contained in:
psi29a 2024-01-10 19:05:01 +00:00
commit a0890259e1
7 changed files with 9 additions and 7 deletions

View file

@ -395,8 +395,10 @@ namespace MWGui
{
std::string suggestedName = mAlchemy->suggestPotionName();
if (suggestedName != mSuggestedPotionName)
{
mNameEdit->setCaptionWithReplacing(suggestedName);
mSuggestedPotionName = suggestedName;
mSuggestedPotionName = std::move(suggestedName);
}
mSortModel->clearDragItems();

View file

@ -1065,7 +1065,7 @@ namespace MWGui
{
createActiveFormats(newBook);
mBook = newBook;
mBook = std::move(newBook);
setPage(newPage);
if (newPage < mBook->mPages.size())

View file

@ -440,7 +440,7 @@ namespace MWGui
// If new search term reset position, otherwise continue from current position
if (newSearchTerm != mCurrentSearchTerm)
{
mCurrentSearchTerm = newSearchTerm;
mCurrentSearchTerm = std::move(newSearchTerm);
mCurrentOccurrenceIndex = std::string::npos;
}

View file

@ -221,7 +221,7 @@ namespace MWGui::Formatting
}
}
mAttributes[key] = value;
mAttributes[key] = std::move(value);
}
}

View file

@ -472,7 +472,7 @@ namespace MWGui
ESM::EffectList effectList;
effectList.mList = mEffects;
mSpell.mEffects = effectList;
mSpell.mEffects = std::move(effectList);
mSpell.mData.mCost = int(y);
mSpell.mData.mType = ESM::Spell::ST_Spell;
mSpell.mData.mFlags = 0;

View file

@ -172,7 +172,7 @@ namespace MWGui
w += 16;
ToolTipInfo* tooltipInfo = image->getUserData<ToolTipInfo>();
tooltipInfo->text = sourcesDescription;
tooltipInfo->text = std::move(sourcesDescription);
// Fade out
if (totalDuration >= fadeTime && fadeTime > 0.f)

View file

@ -251,7 +251,7 @@ namespace MWGui
if (!cost.empty() && cost != "0")
info.text
+= MWGui::ToolTips::getValueString(MWMechanics::calcSpellCost(*spell), "#{sCastCost}");
info.effects = effects;
info.effects = std::move(effects);
tooltipSize = createToolTip(info);
}
else if (type == "Layout")