Remove unnecessary unordered_map lookup(which will cause seg fault.)

This commit is contained in:
Syoyo Fujita
2022-10-19 06:21:07 +09:00
parent 9dab0058b1
commit ec4e962785
3 changed files with 11 additions and 0 deletions

View File

@@ -2279,8 +2279,13 @@ bool USDCReader::Impl::ReconstructPrimRecursively(
return false;
}
#if 0 // not used
crate::Spec spec;
{
if (!psmap.count(uint32_t(current))) {
PUSH_ERROR_AND_RETURN_TAG(kTag, fmt::format("Spec index {} not found in parent Prim index {}", current, parent));
}
uint32_t spec_index = psmap.at(uint32_t(current));
if (spec_index >= _specs.size()) {
@@ -2291,6 +2296,7 @@ bool USDCReader::Impl::ReconstructPrimRecursively(
spec = _specs[spec_index];
}
#endif
// TODO: Refactor
@@ -2373,6 +2379,7 @@ bool USDCReader::Impl::ReconstructStage(Stage *stage) {
PUSH_ERROR_AND_RETURN("Multiple PathIndex found in Crate data.");
}
DCOUT(fmt::format("path index[{}] -> spec index [{}]", _specs[i].path_index.value, uint32_t(i)));
path_index_to_spec_index_map[_specs[i].path_index.value] = uint32_t(i);
}
}

View File

@@ -0,0 +1,4 @@
#usda 1.0
(
metersPerUnit = 11
)

Binary file not shown.