mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-22 03:40:49 +00:00
Avoid redundant string copies
This commit is contained in:
parent
78459314bf
commit
fb16871c80
@ -110,7 +110,7 @@ namespace MWClass
|
|||||||
text += MWGui::ToolTips::getCellRefString(ptr.getCellRef());
|
text += MWGui::ToolTips::getCellRefString(ptr.getCellRef());
|
||||||
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
||||||
}
|
}
|
||||||
info.text = text;
|
info.text = std::move(text);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ namespace MWClass
|
|||||||
text += MWGui::ToolTips::getCellRefString(ptr.getCellRef());
|
text += MWGui::ToolTips::getCellRefString(ptr.getCellRef());
|
||||||
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
||||||
}
|
}
|
||||||
info.text = text;
|
info.text = std::move(text);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
@ -265,7 +265,7 @@ namespace MWClass
|
|||||||
if (!info.enchant.empty())
|
if (!info.enchant.empty())
|
||||||
info.remainingEnchantCharge = static_cast<int>(ptr.getCellRef().getEnchantmentCharge());
|
info.remainingEnchantCharge = static_cast<int>(ptr.getCellRef().getEnchantmentCharge());
|
||||||
|
|
||||||
info.text = text;
|
info.text = std::move(text);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ namespace MWClass
|
|||||||
|
|
||||||
info.enchant = ref->mBase->mEnchant;
|
info.enchant = ref->mBase->mEnchant;
|
||||||
|
|
||||||
info.text = text;
|
info.text = std::move(text);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,7 @@ namespace MWClass
|
|||||||
if (!info.enchant.empty())
|
if (!info.enchant.empty())
|
||||||
info.remainingEnchantCharge = static_cast<int>(ptr.getCellRef().getEnchantmentCharge());
|
info.remainingEnchantCharge = static_cast<int>(ptr.getCellRef().getEnchantmentCharge());
|
||||||
|
|
||||||
info.text = text;
|
info.text = std::move(text);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
@ -271,7 +271,7 @@ namespace MWClass
|
|||||||
text += "\nYou can not use evidence chests";
|
text += "\nYou can not use evidence chests";
|
||||||
}
|
}
|
||||||
|
|
||||||
info.text = text;
|
info.text = std::move(text);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
@ -599,7 +599,7 @@ namespace MWClass
|
|||||||
std::string text;
|
std::string text;
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp())
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp())
|
||||||
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
||||||
info.text = text;
|
info.text = std::move(text);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
@ -293,7 +293,7 @@ namespace MWClass
|
|||||||
text += MWGui::ToolTips::getCellRefString(ptr.getCellRef());
|
text += MWGui::ToolTips::getCellRefString(ptr.getCellRef());
|
||||||
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
||||||
}
|
}
|
||||||
info.text = text;
|
info.text = std::move(text);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
@ -145,7 +145,7 @@ namespace MWClass
|
|||||||
}
|
}
|
||||||
info.effects = list;
|
info.effects = list;
|
||||||
|
|
||||||
info.text = text;
|
info.text = std::move(text);
|
||||||
info.isIngredient = true;
|
info.isIngredient = true;
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
|
@ -177,7 +177,7 @@ namespace MWClass
|
|||||||
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
||||||
}
|
}
|
||||||
|
|
||||||
info.text = text;
|
info.text = std::move(text);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,7 @@ namespace MWClass
|
|||||||
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
||||||
}
|
}
|
||||||
|
|
||||||
info.text = text;
|
info.text = std::move(text);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ namespace MWClass
|
|||||||
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
||||||
}
|
}
|
||||||
|
|
||||||
info.text = text;
|
info.text = std::move(text);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ namespace MWClass
|
|||||||
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
||||||
}
|
}
|
||||||
|
|
||||||
info.text = text;
|
info.text = std::move(text);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ namespace MWClass
|
|||||||
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
||||||
}
|
}
|
||||||
|
|
||||||
info.text = text;
|
info.text = std::move(text);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ namespace MWClass
|
|||||||
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
||||||
}
|
}
|
||||||
|
|
||||||
info.text = text;
|
info.text = std::move(text);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
@ -243,7 +243,7 @@ namespace MWClass
|
|||||||
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
|
||||||
}
|
}
|
||||||
|
|
||||||
info.text = text;
|
info.text = std::move(text);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user