mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 20:26:22 +00:00
Initialize guid map in case of empty file creation
This commit is contained in:
@@ -1423,12 +1423,16 @@ IfcFile::IfcFile(const IfcParse::schema_definition* schema, filetype ty, const s
|
|||||||
|
|
||||||
byid_ = decltype(byid_)(&std::get<impl::in_memory_file_storage>(storage_).byid_);
|
byid_ = decltype(byid_)(&std::get<impl::in_memory_file_storage>(storage_).byid_);
|
||||||
byref_excl_ = decltype(byref_excl_)(&std::get<impl::in_memory_file_storage>(storage_).byref_excl_);
|
byref_excl_ = decltype(byref_excl_)(&std::get<impl::in_memory_file_storage>(storage_).byref_excl_);
|
||||||
|
byguid_ = decltype(byguid_)(&std::get<impl::in_memory_file_storage>(storage_).byguid_);
|
||||||
|
|
||||||
// byidentity_ = decltype(byidentity_)(&std::get<impl::in_memory_file_storage>(storage_).byidentity_);
|
// byidentity_ = decltype(byidentity_)(&std::get<impl::in_memory_file_storage>(storage_).byidentity_);
|
||||||
} else if (ty == FT_ROCKSDB) {
|
} else if (ty == FT_ROCKSDB) {
|
||||||
storage_.emplace<2>(path, this);
|
storage_.emplace<2>(path, this);
|
||||||
|
|
||||||
byid_ = decltype(byid_)(&std::get<impl::rocks_db_file_storage>(storage_).instance_by_name_);
|
byid_ = decltype(byid_)(&std::get<impl::rocks_db_file_storage>(storage_).instance_by_name_);
|
||||||
byref_excl_ = decltype(byref_excl_)(&std::get<impl::rocks_db_file_storage>(storage_).byref_excl_);
|
byref_excl_ = decltype(byref_excl_)(&std::get<impl::rocks_db_file_storage>(storage_).byref_excl_);
|
||||||
|
byguid_ = decltype(byguid_)(&std::get<impl::rocks_db_file_storage>(storage_).byguid_);
|
||||||
|
|
||||||
// byidentity_ = decltype(byidentity_)(&std::get<impl::rocks_db_file_storage>(storage_).instance_cache_);
|
// byidentity_ = decltype(byidentity_)(&std::get<impl::rocks_db_file_storage>(storage_).instance_cache_);
|
||||||
} else {
|
} else {
|
||||||
throw std::runtime_error("Unsupported file format");
|
throw std::runtime_error("Unsupported file format");
|
||||||
|
|||||||
Reference in New Issue
Block a user