1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 18:29:55 +00:00

Avoid redundant string copies

This commit is contained in:
Andrei Kortunov 2024-01-02 18:30:35 +04:00
parent 78459314bf
commit fb16871c80
16 changed files with 16 additions and 16 deletions

View file

@ -110,7 +110,7 @@ namespace MWClass
text += MWGui::ToolTips::getCellRefString(ptr.getCellRef());
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
}
info.text = text;
info.text = std::move(text);
return info;
}

View file

@ -105,7 +105,7 @@ namespace MWClass
text += MWGui::ToolTips::getCellRefString(ptr.getCellRef());
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
}
info.text = text;
info.text = std::move(text);
return info;
}

View file

@ -265,7 +265,7 @@ namespace MWClass
if (!info.enchant.empty())
info.remainingEnchantCharge = static_cast<int>(ptr.getCellRef().getEnchantmentCharge());
info.text = text;
info.text = std::move(text);
return info;
}

View file

@ -127,7 +127,7 @@ namespace MWClass
info.enchant = ref->mBase->mEnchant;
info.text = text;
info.text = std::move(text);
return info;
}

View file

@ -172,7 +172,7 @@ namespace MWClass
if (!info.enchant.empty())
info.remainingEnchantCharge = static_cast<int>(ptr.getCellRef().getEnchantmentCharge());
info.text = text;
info.text = std::move(text);
return info;
}

View file

@ -271,7 +271,7 @@ namespace MWClass
text += "\nYou can not use evidence chests";
}
info.text = text;
info.text = std::move(text);
return info;
}

View file

@ -599,7 +599,7 @@ namespace MWClass
std::string text;
if (MWBase::Environment::get().getWindowManager()->getFullHelp())
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
info.text = text;
info.text = std::move(text);
return info;
}

View file

@ -293,7 +293,7 @@ namespace MWClass
text += MWGui::ToolTips::getCellRefString(ptr.getCellRef());
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
}
info.text = text;
info.text = std::move(text);
return info;
}

View file

@ -145,7 +145,7 @@ namespace MWClass
}
info.effects = list;
info.text = text;
info.text = std::move(text);
info.isIngredient = true;
return info;

View file

@ -177,7 +177,7 @@ namespace MWClass
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
}
info.text = text;
info.text = std::move(text);
return info;
}

View file

@ -122,7 +122,7 @@ namespace MWClass
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
}
info.text = text;
info.text = std::move(text);
return info;
}

View file

@ -167,7 +167,7 @@ namespace MWClass
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
}
info.text = text;
info.text = std::move(text);
return info;
}

View file

@ -118,7 +118,7 @@ namespace MWClass
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
}
info.text = text;
info.text = std::move(text);
return info;
}

View file

@ -121,7 +121,7 @@ namespace MWClass
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
}
info.text = text;
info.text = std::move(text);
return info;
}

View file

@ -123,7 +123,7 @@ namespace MWClass
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
}
info.text = text;
info.text = std::move(text);
return info;
}

View file

@ -243,7 +243,7 @@ namespace MWClass
text += MWGui::ToolTips::getMiscString(ref->mBase->mScript.getRefIdString(), "Script");
}
info.text = text;
info.text = std::move(text);
return info;
}