mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-29 16:22:53 +00:00
Add missing standard library includes for self-sufficient headers
Fixes builds with newer GCC/libstdc++ that no longer provide <cstdint>, <cstring>, <cfloat>, <memory>, <algorithm> etc. transitively. Also disambiguates visit<> calls in taxonomy.h with the full namespace and casts the character value in IfcCharacterDecoder to uint32_t to silence ambiguous overload warnings.
This commit is contained in:
committed by
Thomas Krijnen
parent
6f93357ed2
commit
78697582f7
@@ -49,6 +49,7 @@
|
||||
#include <stack>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <cstdint>
|
||||
#include <BRepExtrema_TriangleSet.hxx>
|
||||
#include <BRepLProp_SLProps.hxx>
|
||||
#include <BVH_BinaryTree.hxx>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "clash_utils.h"
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <cfloat>
|
||||
|
||||
#define GU_CULLING_EPSILON_RAY_TRIANGLE FLT_EPSILON*FLT_EPSILON
|
||||
#define PX_MAX_F32 3.4028234663852885981170418348452e+38F
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <mutex>
|
||||
#include <unordered_set>
|
||||
#include <cstdint>
|
||||
|
||||
#define INCLUDE_SCHEMA(x) STRINGIFY(../../ifcparse/schemas/x.h)
|
||||
#include INCLUDE_SCHEMA(IfcSchema)
|
||||
|
||||
+15
-8
@@ -17,6 +17,13 @@
|
||||
#include <tuple>
|
||||
#include <exception>
|
||||
#include <numeric>
|
||||
#include <cstdint>
|
||||
#include <cmath>
|
||||
#include <array>
|
||||
#include <limits>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <stdexcept>
|
||||
|
||||
#ifndef TAXONOMY_USE_UNIQUE_PTR
|
||||
#ifndef TAXONOMY_USE_NAKED_PTR
|
||||
@@ -1623,25 +1630,25 @@ typedef item const* ptr;
|
||||
// @todo Sad... now that we have templated collection members,
|
||||
// we can't generally use collection_base anymore as a cast target.
|
||||
if (auto s = taxonomy::dcast<taxonomy::collection>(i)) {
|
||||
visit<taxonomy::collection>(s, fn);
|
||||
ifcopenshell::geometry::visit<taxonomy::collection>(s, fn);
|
||||
}
|
||||
else if (auto s = taxonomy::dcast<taxonomy::loop>(i)) {
|
||||
visit<taxonomy::loop>(s, fn);
|
||||
ifcopenshell::geometry::visit<taxonomy::loop>(s, fn);
|
||||
}
|
||||
else if (auto s = taxonomy::dcast<taxonomy::face>(i)) {
|
||||
visit<taxonomy::face>(s, fn);
|
||||
ifcopenshell::geometry::visit<taxonomy::face>(s, fn);
|
||||
}
|
||||
else if (auto s = taxonomy::dcast<taxonomy::shell>(i)) {
|
||||
visit<taxonomy::shell>(s, fn);
|
||||
ifcopenshell::geometry::visit<taxonomy::shell>(s, fn);
|
||||
}
|
||||
else if (auto s = taxonomy::dcast<taxonomy::solid>(i)) {
|
||||
visit<taxonomy::solid>(s, fn);
|
||||
ifcopenshell::geometry::visit<taxonomy::solid>(s, fn);
|
||||
}
|
||||
else if (auto s = taxonomy::dcast<taxonomy::loft>(i)) {
|
||||
visit<taxonomy::loft>(s, fn);
|
||||
ifcopenshell::geometry::visit<taxonomy::loft>(s, fn);
|
||||
}
|
||||
else if (auto s = taxonomy::dcast<taxonomy::boolean_result>(i)) {
|
||||
visit<taxonomy::boolean_result>(s, fn);
|
||||
ifcopenshell::geometry::visit<taxonomy::boolean_result>(s, fn);
|
||||
}
|
||||
else {
|
||||
fn(i);
|
||||
@@ -1756,4 +1763,4 @@ typedef item const* ptr;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user