diff --git a/ogre/src/OgreMaterial.cc b/ogre/src/OgreMaterial.cc index a558c6fd9..fafa31891 100644 --- a/ogre/src/OgreMaterial.cc +++ b/ogre/src/OgreMaterial.cc @@ -383,7 +383,7 @@ void OgreMaterial::UpdateShaderParams() void OgreMaterial::UpdateShaderParams(ConstShaderParamsPtr _params, Ogre::GpuProgramParametersSharedPtr _ogreParams) { - for (const auto name_param : *_params) + for (const auto &name_param : *_params) { if (ShaderParam::PARAM_FLOAT == name_param.second.Type()) { diff --git a/ogre2/src/Ogre2Material.cc b/ogre2/src/Ogre2Material.cc index 62337a32e..8b4088073 100644 --- a/ogre2/src/Ogre2Material.cc +++ b/ogre2/src/Ogre2Material.cc @@ -682,7 +682,7 @@ void Ogre2Material::UpdateShaderParams() void Ogre2Material::UpdateShaderParams(ConstShaderParamsPtr _params, Ogre::GpuProgramParametersSharedPtr _ogreParams) { - for (const auto name_param : *_params) + for (const auto &name_param : *_params) { auto *constantDef = Ogre::GpuProgramParameters::getAutoConstantDefinition(name_param.first); diff --git a/src/Heightmap_TEST.cc b/src/Heightmap_TEST.cc index 84b626d64..65c737511 100644 --- a/src/Heightmap_TEST.cc +++ b/src/Heightmap_TEST.cc @@ -19,7 +19,7 @@ #include #include -#include +#include #include "test_config.h" // NOLINT(build/include) #include "ignition/rendering/RenderEngine.hh" diff --git a/src/ShaderParams_TEST.cc b/src/ShaderParams_TEST.cc index f8f9dfb7e..49a8eaa77 100644 --- a/src/ShaderParams_TEST.cc +++ b/src/ShaderParams_TEST.cc @@ -66,7 +66,7 @@ TEST(ShaderParams, ConstRangeForLoopDoesNotDirty) params["some_parameter"] = 4.0f; params.ClearDirty(); - for (const auto name_param : params) + for (const auto &name_param : params) { EXPECT_EQ(std::string("some_parameter"), name_param.first); }