From a2f0bc8a176869b63d86912e2dfb1ae8fd7f3fa7 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 9 Sep 2025 13:26:21 +0200 Subject: [PATCH] Further implement serialization --- src/ifcparse/IfcEntityInstanceData.cpp | 13 ++++++------- src/ifcparse/IfcFile.cpp | 4 ++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/ifcparse/IfcEntityInstanceData.cpp b/src/ifcparse/IfcEntityInstanceData.cpp index 201701b6ed..ea05360c31 100644 --- a/src/ifcparse/IfcEntityInstanceData.cpp +++ b/src/ifcparse/IfcEntityInstanceData.cpp @@ -333,23 +333,22 @@ bool impl::serialize(std::string& val, const empty_aggregate_t& t) { val.resize(1); val[0] = TypeEncoder::encode_type(); - return false; + return true; } bool impl::serialize(std::string& val, const empty_aggregate_of_aggregate_t& t) { val.resize(1); val[0] = TypeEncoder::encode_type(); - return false; + return true; } bool impl::serialize(std::string& val, const boost::logic::tribool& t) { - using T = char; - T tt = t == boost::logic::indeterminate ? 2 : t ? 1 : 0; - val.resize(sizeof(T) + 1); - val[0] = TypeEncoder::encode_type(); - memcpy(val.data() + 1, &tt, sizeof(T)); + char tt = t == boost::logic::indeterminate ? 2 : t ? 1 : 0; + val.resize(sizeof(char) + 1); + val[0] = TypeEncoder::encode_type(); + memcpy(val.data() + 1, &tt, sizeof(char)); return true; } diff --git a/src/ifcparse/IfcFile.cpp b/src/ifcparse/IfcFile.cpp index bbc48fd217..3a9edac695 100644 --- a/src/ifcparse/IfcFile.cpp +++ b/src/ifcparse/IfcFile.cpp @@ -421,6 +421,10 @@ namespace { tbo.pin_top_level_index_and_filter = true; */ + // 28: 256MB + // 29: 512MB + // 30: 1GB + auto block_cache = rocksdb::NewLRUCache(1ULL << 30); tbo.block_cache = block_cache;