Skip to content

Commit

Permalink
Samples: range loop refactoring (#2993)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joilnen authored Jan 2, 2024
1 parent 1ff903f commit f28cfd0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Samples/Simple/include/Dot3Bump.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ class _OgreSampleClassExport Sample_Dot3Bump : public SdkSample

mPossibilities["athene.mesh"] = matNames;

for (std::map<String, StringVector>::iterator it = mPossibilities.begin(); it != mPossibilities.end(); it++)
for (const auto& p : mPossibilities)
{
// load each mesh with non-default hardware buffer usage options
MeshPtr mesh = MeshManager::getSingleton().load(it->first, ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
MeshPtr mesh = MeshManager::getSingleton().load(p.first, ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY);

// build tangent vectors for our mesh
Expand All @@ -141,7 +141,7 @@ class _OgreSampleClassExport Sample_Dot3Bump : public SdkSample

// create an entity from the mesh and set the first available material
Entity* ent = mSceneMgr->createEntity(mesh->getName(), mesh->getName());
ent->setMaterialName(it->second.front());
ent->setMaterialName(p.second.front());
}
}

Expand Down Expand Up @@ -192,8 +192,8 @@ class _OgreSampleClassExport Sample_Dot3Bump : public SdkSample

// create a menu to choose the model displayed
mMeshMenu = mTrayMgr->createLongSelectMenu(TL_BOTTOM, "Mesh", "Mesh", 370, 290, 10);
for (std::map<String, StringVector>::iterator it = mPossibilities.begin(); it != mPossibilities.end(); it++)
mMeshMenu->addItem(it->first);
for (const auto& p : mPossibilities)
mMeshMenu->addItem(p.first);

// create a menu to choose the material used by the model
mMaterialMenu = mTrayMgr->createLongSelectMenu(TL_BOTTOM, "Material", "Material", 370, 290, 10);
Expand Down

0 comments on commit f28cfd0

Please sign in to comment.