Last minute refactoring

This commit is contained in:
Thomas Krijnen
2026-08-08 07:42:45 +02:00
parent 8870ffb018
commit af58eaf79f
300 changed files with 5230 additions and 5150 deletions
+9 -9
View File
@@ -101,15 +101,15 @@ Header_section_schema::file_schema ifcopenshell::spf_header::file_schema() {
void ifcopenshell::spf_header::assign(const spf_header& other) {
if (this != &other) {
auto copy_inst = [](express::Entity& new_entity, const express::Entity& entity) {
auto copy_inst = [](express::entity& new_entity, const express::entity& entity) {
for (size_t i = 0; i < entity.declaration().as_entity()->attribute_count(); ++i) {
entity.get_attribute_value(i).apply_visitor([i, &entity, &new_entity](const auto& v) {
using U = std::decay_t<decltype(v)>;
if constexpr (std::is_same_v<U, express::Base>) {
} else if constexpr (std::is_same_v<U, std::vector<express::Base>>) {
} else if constexpr (std::is_same_v<U, std::vector<std::vector<express::Base>>>) {
} else if constexpr (std::is_same_v<U, empty_aggregate_t>) {
} else if constexpr (std::is_same_v<U, empty_aggregate_of_aggregate_t>) {
using u = std::decay_t<decltype(v)>;
if constexpr (std::is_same_v<u, express::base>) {
} else if constexpr (std::is_same_v<u, std::vector<express::base>>) {
} else if constexpr (std::is_same_v<u, std::vector<std::vector<express::base>>>) {
} else if constexpr (std::is_same_v<u, empty_aggregate_t>) {
} else if constexpr (std::is_same_v<u, empty_aggregate_of_aggregate_t>) {
} else {
new_entity.set_attribute_value(i, v);
}
@@ -118,8 +118,8 @@ void ifcopenshell::spf_header::assign(const spf_header& other) {
};
for (size_t i = 0; i < header_entities_.size(); ++i) {
express::Entity tmp(header_entities_[i]);
copy_inst(tmp, express::Entity(other.header_entities_[i]));
express::entity tmp(header_entities_[i]);
copy_inst(tmp, express::entity(other.header_entities_[i]));
}
}
}