mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 16:29:55 +00:00
Fix "warning: loop variable is copied but only used as const reference;...
This commit is contained in:
parent
0eed275b74
commit
1a6be08149
3 changed files with 4 additions and 4 deletions
|
@ -273,7 +273,7 @@ namespace Resource
|
|||
correct format for OpenMW: <Description>alphatest mode value MaterialName</Description>
|
||||
e.g <Description>alphatest GEQUAL 0.8 MyAlphaTestedMaterial</Description> */
|
||||
std::vector<std::string> descriptions = node.getDescriptions();
|
||||
for (auto description : descriptions)
|
||||
for (const auto & description : descriptions)
|
||||
{
|
||||
mDescriptions.emplace_back(description);
|
||||
}
|
||||
|
@ -281,7 +281,7 @@ namespace Resource
|
|||
// Iterate each description, and see if the current node uses the specified material for alpha testing
|
||||
if (node.getStateSet())
|
||||
{
|
||||
for (auto description : mDescriptions)
|
||||
for (const auto & description : mDescriptions)
|
||||
{
|
||||
std::vector<std::string> descriptionParts;
|
||||
std::istringstream descriptionStringStream(description);
|
||||
|
|
|
@ -1404,7 +1404,7 @@ void MWShadowTechnique::cull(osgUtil::CullVisitor& cv)
|
|||
std::string validRegionUniformName = "validRegionMatrix" + std::to_string(sm_i);
|
||||
osg::ref_ptr<osg::Uniform> validRegionUniform;
|
||||
|
||||
for (auto uniform : _uniforms[cv.getTraversalNumber() % 2])
|
||||
for (const auto & uniform : _uniforms[cv.getTraversalNumber() % 2])
|
||||
{
|
||||
if (uniform->getName() == validRegionUniformName)
|
||||
validRegionUniform = uniform;
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace SceneUtil
|
|||
if (channelTargetName != umt->getName()) continue;
|
||||
|
||||
// check if we can link a StackedTransformElement to the current Channel
|
||||
for (auto stackedTransform : umt->getStackedTransforms())
|
||||
for (const auto & stackedTransform : umt->getStackedTransforms())
|
||||
{
|
||||
osgAnimation::StackedTransformElement* element = stackedTransform.get();
|
||||
if (element && !element->getName().empty() && channelName == element->getName())
|
||||
|
|
Loading…
Reference in a new issue