mirror of
https://github.com/lighttransport/tinyusdz.git
synced 2026-01-18 01:11:17 +01:00
Remove unnecessary unordered_map lookup(which will cause seg fault.)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
4
tests/usda/stage-meta-only-001.usda
Normal file
4
tests/usda/stage-meta-only-001.usda
Normal file
@@ -0,0 +1,4 @@
|
||||
#usda 1.0
|
||||
(
|
||||
metersPerUnit = 11
|
||||
)
|
||||
BIN
tests/usdc/stage-meta-only-001.usdc
Normal file
BIN
tests/usdc/stage-meta-only-001.usdc
Normal file
Binary file not shown.
Reference in New Issue
Block a user