Browse Source

SceneTools: add a note why std::pair has to be used here.

pull/601/head
Vladimír Vondruš 3 years ago
parent
commit
02df65f688
  1. 3
      src/Magnum/SceneTools/Implementation/combine.h

3
src/Magnum/SceneTools/Implementation/combine.h

@ -112,7 +112,8 @@ inline Trade::SceneData combine(const Trade::SceneMappingType mappingType, const
CORRADE_INTERNAL_ASSERT(!(field.flags() & Trade::SceneFieldFlag::OffsetOnly));
/* Mapping data. Allocate if the view is a placeholder of if it wasn't
used by other fields yet. */
used by other fields yet. std::pair is used due to this being
returned from a std::unordered_map. */
std::pair<std::unordered_map<const void*, UnsignedInt>::iterator, bool> inserted;
if(field.mappingData().data())
inserted = objectMappings.emplace(field.mappingData().data(), itemViewOffset);

Loading…
Cancel
Save