mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +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:
@@ -48,6 +48,7 @@
|
|||||||
#include <stack>
|
#include <stack>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
#include <cstdint>
|
||||||
#include <BRepExtrema_TriangleSet.hxx>
|
#include <BRepExtrema_TriangleSet.hxx>
|
||||||
#include <BRepLProp_SLProps.hxx>
|
#include <BRepLProp_SLProps.hxx>
|
||||||
#include <BVH_BinaryTree.hxx>
|
#include <BVH_BinaryTree.hxx>
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#include "clash_utils.h"
|
#include "clash_utils.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cfloat>
|
||||||
|
|
||||||
#define GU_CULLING_EPSILON_RAY_TRIANGLE FLT_EPSILON*FLT_EPSILON
|
#define GU_CULLING_EPSILON_RAY_TRIANGLE FLT_EPSILON*FLT_EPSILON
|
||||||
#define PX_MAX_F32 3.4028234663852885981170418348452e+38F
|
#define PX_MAX_F32 3.4028234663852885981170418348452e+38F
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include "../../ifcparse/IfcLogger.h"
|
#include "../../ifcparse/IfcLogger.h"
|
||||||
|
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#define INCLUDE_SCHEMA(x) STRINGIFY(../../ifcparse/x.h)
|
#define INCLUDE_SCHEMA(x) STRINGIFY(../../ifcparse/x.h)
|
||||||
#include INCLUDE_SCHEMA(IfcSchema)
|
#include INCLUDE_SCHEMA(IfcSchema)
|
||||||
|
|||||||
+14
-7
@@ -17,6 +17,13 @@
|
|||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cmath>
|
||||||
|
#include <array>
|
||||||
|
#include <limits>
|
||||||
|
#include <functional>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <stdexcept>
|
||||||
|
|
||||||
#ifndef TAXONOMY_USE_UNIQUE_PTR
|
#ifndef TAXONOMY_USE_UNIQUE_PTR
|
||||||
#ifndef TAXONOMY_USE_NAKED_PTR
|
#ifndef TAXONOMY_USE_NAKED_PTR
|
||||||
@@ -1625,19 +1632,19 @@ typedef item const* ptr;
|
|||||||
// @todo Sad... now that we have templated collection members,
|
// @todo Sad... now that we have templated collection members,
|
||||||
// we can't generally use collection_base anymore as a cast target.
|
// we can't generally use collection_base anymore as a cast target.
|
||||||
if (auto s = std::dynamic_pointer_cast<taxonomy::collection>(i)) {
|
if (auto s = std::dynamic_pointer_cast<taxonomy::collection>(i)) {
|
||||||
visit<taxonomy::collection>(s, fn);
|
ifcopenshell::geometry::visit<taxonomy::collection>(s, fn);
|
||||||
} else if (auto s = std::dynamic_pointer_cast<taxonomy::loop>(i)) {
|
} else if (auto s = std::dynamic_pointer_cast<taxonomy::loop>(i)) {
|
||||||
visit<taxonomy::loop>(s, fn);
|
ifcopenshell::geometry::visit<taxonomy::loop>(s, fn);
|
||||||
} else if (auto s = std::dynamic_pointer_cast<taxonomy::face>(i)) {
|
} else if (auto s = std::dynamic_pointer_cast<taxonomy::face>(i)) {
|
||||||
visit<taxonomy::face>(s, fn);
|
ifcopenshell::geometry::visit<taxonomy::face>(s, fn);
|
||||||
} else if (auto s = std::dynamic_pointer_cast<taxonomy::shell>(i)) {
|
} else if (auto s = std::dynamic_pointer_cast<taxonomy::shell>(i)) {
|
||||||
visit<taxonomy::shell>(s, fn);
|
ifcopenshell::geometry::visit<taxonomy::shell>(s, fn);
|
||||||
} else if (auto s = std::dynamic_pointer_cast<taxonomy::solid>(i)) {
|
} else if (auto s = std::dynamic_pointer_cast<taxonomy::solid>(i)) {
|
||||||
visit<taxonomy::solid>(s, fn);
|
ifcopenshell::geometry::visit<taxonomy::solid>(s, fn);
|
||||||
} else if (auto s = std::dynamic_pointer_cast<taxonomy::loft>(i)) {
|
} else if (auto s = std::dynamic_pointer_cast<taxonomy::loft>(i)) {
|
||||||
visit<taxonomy::loft>(s, fn);
|
ifcopenshell::geometry::visit<taxonomy::loft>(s, fn);
|
||||||
} else if (auto s = std::dynamic_pointer_cast<taxonomy::boolean_result>(i)) {
|
} else if (auto s = std::dynamic_pointer_cast<taxonomy::boolean_result>(i)) {
|
||||||
visit<taxonomy::boolean_result>(s, fn);
|
ifcopenshell::geometry::visit<taxonomy::boolean_result>(s, fn);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fn(i);
|
fn(i);
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
#include <cstdint>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
class aggregate_of_instance;
|
class aggregate_of_instance;
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ namespace {
|
|||||||
if (character >= 0x20 && character <= 0x7e) {
|
if (character >= 0x20 && character <= 0x7e) {
|
||||||
stream.put((char)character);
|
stream.put((char)character);
|
||||||
} else {
|
} else {
|
||||||
stream << "\\u" << character;
|
stream << "\\u" << static_cast<uint32_t>(character);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return stream.str();
|
return stream.str();
|
||||||
|
|||||||
@@ -36,6 +36,9 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#include <boost/optional.hpp>
|
#include <boost/optional.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/logic/tribool.hpp>
|
#include <boost/logic/tribool.hpp>
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#include <boost/circular_buffer.hpp>
|
#include <boost/circular_buffer.hpp>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#ifdef IFOPSH_WITH_ROCKSDB
|
#ifdef IFOPSH_WITH_ROCKSDB
|
||||||
#include <rocksdb/merge_operator.h>
|
#include <rocksdb/merge_operator.h>
|
||||||
|
|||||||
@@ -25,7 +25,9 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
|
#include <cstdint>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
namespace IfcParse {
|
namespace IfcParse {
|
||||||
class declaration;
|
class declaration;
|
||||||
|
|||||||
@@ -30,6 +30,8 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct is_std_tuple : std::false_type {};
|
struct is_std_tuple : std::false_type {};
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ namespace rocksdb {
|
|||||||
|
|
||||||
#include <variant>
|
#include <variant>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cstring>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|||||||
@@ -33,6 +33,10 @@ variant - which is the maximum size of its constituents - is reduced.
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cstring>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <limits>
|
||||||
|
|
||||||
#include "IfcException.h"
|
#include "IfcException.h"
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,8 @@
|
|||||||
|
|
||||||
#include "../ifcparse/utils.h"
|
#include "../ifcparse/utils.h"
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#ifdef WITH_PROJ
|
#ifdef WITH_PROJ
|
||||||
#include <proj.h>
|
#include <proj.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#include <numeric>
|
#include <numeric>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#ifdef USE_BINARY
|
#ifdef USE_BINARY
|
||||||
#define write_shape write_binary
|
#define write_shape write_binary
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
|
|
||||||
#include <rocksdb/options.h>
|
#include <rocksdb/options.h>
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#include "../ifcparse/IfcLogger.h"
|
#include "../ifcparse/IfcLogger.h"
|
||||||
|
|
||||||
RocksDbSerializer::RocksDbSerializer(IfcParse::IfcFile* file, const std::string& rocksdb_filename)
|
RocksDbSerializer::RocksDbSerializer(IfcParse::IfcFile* file, const std::string& rocksdb_filename)
|
||||||
|
|||||||
Reference in New Issue
Block a user