Skip to content

Commit

Permalink
SceneTools: fix some variable shadowing warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
mosra committed Mar 5, 2024
1 parent 279856f commit 81855a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/Magnum/SceneTools/Implementation/combine.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,11 @@ inline Trade::SceneData combineFields(const Trade::SceneMappingType mappingType,
/** @todo this needs Utility::copy() for bits, which is HARD */
const Containers::MutableStridedBitArrayView2D dst = itemViews[itemViewMappings[i].second()].bits;
const std::size_t arraySize = field.fieldArraySize() ? field.fieldArraySize() : 1;
for(std::size_t i = 0, iMax = field.size(); i != iMax; ++i) {
const Containers::StridedBitArrayView1D srcI = src[i];
const Containers::MutableStridedBitArrayView1D dstI = dst[i];
for(std::size_t j = 0; j != arraySize; ++j)
dstI.set(j, srcI[j]);
for(std::size_t j = 0, iMax = field.size(); j != iMax; ++j) {
const Containers::StridedBitArrayView1D srcI = src[j];
const Containers::MutableStridedBitArrayView1D dstI = dst[j];
for(std::size_t k = 0; k != arraySize; ++k)
dstI.set(k, srcI[k]);
}
} else {
const Containers::StridedArrayView1D<const void> src = field.fieldData();
Expand Down
12 changes: 6 additions & 6 deletions src/Magnum/SceneTools/sceneconverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1389,11 +1389,11 @@ well, the IDs reference attributes of the first mesh.)")

if(!(Trade::sceneContentsFor(*converter) & Trade::SceneContent::Materials)) {
Warning{} << "Ignoring" << materials.size() << "materials not supported by the converter";
} else for(UnsignedInt i = 0; i != materials.size(); ++i) {
} else for(UnsignedInt j = 0; j != materials.size(); ++j) {
Trade::Implementation::Duration d{conversionTime};

if(!converter->add(materials[i], contents & Trade::SceneContent::Names ? importer->materialName(i) : Containers::String{})) {
Error{} << "Cannot add material" << i;
if(!converter->add(materials[j], contents & Trade::SceneContent::Names ? importer->materialName(j) : Containers::String{})) {
Error{} << "Cannot add material" << j;
return 1;
}
}
Expand Down Expand Up @@ -1441,11 +1441,11 @@ well, the IDs reference attributes of the first mesh.)")

if(!(Trade::sceneContentsFor(*converter) & Trade::SceneContent::Scenes)) {
Warning{} << "Ignoring" << scenes.size() << "scenes not supported by the converter";
} else for(UnsignedInt i = 0; i != scenes.size(); ++i) {
} else for(UnsignedInt j = 0; j != scenes.size(); ++j) {
Trade::Implementation::Duration d{conversionTime};

if(!converter->add(scenes[i], contents & Trade::SceneContent::Names ? importer->sceneName(i) : Containers::String{})) {
Error{} << "Cannot add scene" << i;
if(!converter->add(scenes[j], contents & Trade::SceneContent::Names ? importer->sceneName(j) : Containers::String{})) {
Error{} << "Cannot add scene" << j;
return 1;
}
}
Expand Down

0 comments on commit 81855a1

Please sign in to comment.