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:
commit
a0890259e1
7 changed files with 9 additions and 7 deletions
|
@ -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();
|
||||
|
||||
|
|
|
@ -1065,7 +1065,7 @@ namespace MWGui
|
|||
{
|
||||
createActiveFormats(newBook);
|
||||
|
||||
mBook = newBook;
|
||||
mBook = std::move(newBook);
|
||||
setPage(newPage);
|
||||
|
||||
if (newPage < mBook->mPages.size())
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -221,7 +221,7 @@ namespace MWGui::Formatting
|
|||
}
|
||||
}
|
||||
|
||||
mAttributes[key] = value;
|
||||
mAttributes[key] = std::move(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue