mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 09:15:38 +00:00
Dont copy-construct from a const-ref when used only as a const-ref
This also makes clang-tiny a bit happier
This commit is contained in:
parent
4f99c060c3
commit
deb2af6acc
4 changed files with 5 additions and 5 deletions
|
@ -36,7 +36,7 @@ void CSVTools::SearchSubView::replace (bool selection)
|
|||
// in a single string.
|
||||
for (std::vector<int>::const_reverse_iterator iter (indices.rbegin()); iter!=indices.rend(); ++iter)
|
||||
{
|
||||
CSMWorld::UniversalId id = model.getUniversalId (*iter);
|
||||
const CSMWorld::UniversalId& id = model.getUniversalId (*iter);
|
||||
|
||||
CSMWorld::UniversalId::Type type = CSMWorld::UniversalId::getParentType (id.getType());
|
||||
|
||||
|
|
|
@ -704,7 +704,7 @@ namespace MWGui
|
|||
if (!MWBase::Environment::get().getWindowManager()->isAllowed(GW_Inventory))
|
||||
return;
|
||||
// make sure the object is of a type that can be picked up
|
||||
std::string type = object.getTypeName();
|
||||
const std::string& type = object.getTypeName();
|
||||
if ( (type != typeid(ESM::Apparatus).name())
|
||||
&& (type != typeid(ESM::Armor).name())
|
||||
&& (type != typeid(ESM::Book).name())
|
||||
|
|
|
@ -143,7 +143,7 @@ MWWorld::ContainerStoreIterator MWWorld::InventoryStore::add(const Ptr& itemPtr,
|
|||
if (allowAutoEquip && actorPtr != MWMechanics::getPlayer()
|
||||
&& actorPtr.getClass().isNpc() && !actorPtr.getClass().getNpcStats(actorPtr).isWerewolf())
|
||||
{
|
||||
std::string type = itemPtr.getTypeName();
|
||||
const std::string& type = itemPtr.getTypeName();
|
||||
if (type == typeid(ESM::Armor).name() || type == typeid(ESM::Clothing).name())
|
||||
autoEquip(actorPtr);
|
||||
}
|
||||
|
@ -748,7 +748,7 @@ int MWWorld::InventoryStore::remove(const Ptr& item, int count, const Ptr& actor
|
|||
if (equipReplacement && wasEquipped && (actor != MWMechanics::getPlayer())
|
||||
&& actor.getClass().isNpc() && !actor.getClass().getNpcStats(actor).isWerewolf())
|
||||
{
|
||||
std::string type = item.getTypeName();
|
||||
const std::string& type = item.getTypeName();
|
||||
if (type == typeid(ESM::Armor).name() || type == typeid(ESM::Clothing).name())
|
||||
autoEquip(actor);
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ btCollisionShape* BulletShape::duplicateCollisionShape(const btCollisionShape *s
|
|||
for(int i = 0;i < numShapes;++i)
|
||||
{
|
||||
btCollisionShape *child = duplicateCollisionShape(comp->getChildShape(i));
|
||||
btTransform trans = comp->getChildTransform(i);
|
||||
const btTransform& trans = comp->getChildTransform(i);
|
||||
newShape->addChildShape(trans, child);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue