Silence remaining compiler warnings

Generated with the assistance of an AI coding tool.
This commit is contained in:
Thomas Krijnen
2026-08-09 09:04:28 +02:00
parent dcfc22e29e
commit 28c9c1d34d
24 changed files with 140 additions and 213 deletions
+1 -3
View File
@@ -777,8 +777,6 @@ std::pair<Ifc4x3_add2::IfcCurveSegment, Ifc4x3_add2::IfcCurveSegment> mapAlignme
auto start_height = segment.StartHeight();
auto start_gradient = segment.StartGradient();
auto end_gradient = segment.EndGradient();
auto radius_of_curvature = segment.RadiusOfCurvature();
auto type = segment.PredefinedType();
if (type == Ifc4x3_add2::IfcAlignmentVerticalSegmentTypeEnum::IfcAlignmentVerticalSegmentType_CONSTANTGRADIENT) {
@@ -862,7 +860,7 @@ std::pair<Ifc4x3_add2::IfcCurveSegment, Ifc4x3_add2::IfcCurveSegment> mapAlignme
return result;
}
std::pair<Ifc4x3_add2::IfcCurveSegment, Ifc4x3_add2::IfcCurveSegment> mapAlignmentCantSegment(hierarchy_helper<Ifc4x3_add2>& file, const Ifc4x3_add2::IfcAlignmentCantSegment& segment, ifcopenshell::logger& logger) {
std::pair<Ifc4x3_add2::IfcCurveSegment, Ifc4x3_add2::IfcCurveSegment> mapAlignmentCantSegment(hierarchy_helper<Ifc4x3_add2>&, const Ifc4x3_add2::IfcAlignmentCantSegment& segment, ifcopenshell::logger& logger) {
std::pair<Ifc4x3_add2::IfcCurveSegment, Ifc4x3_add2::IfcCurveSegment> result;
auto type = segment.PredefinedType();
if (type == Ifc4x3_add2::IfcAlignmentCantSegmentTypeEnum::IfcAlignmentCantSegmentType_BLOSSCURVE) {
+21 -9
View File
@@ -23,7 +23,6 @@
#include "ifc_parse_api.h"
#include "express.h"
#include <boost/scope_exit.hpp>
#include <cstddef>
#include <cstdint>
#include <exception>
@@ -156,15 +155,28 @@ class IFC_PARSE_API logger {
// `logger_or_root` is just covering the boilerplate for this pattern.
inline logger& logger_or_root(logger* logger) { return logger ? *logger : logger::root(); }
namespace detail {
class performance_scope {
std::string label_;
public:
explicit performance_scope(const std::string& label) : label_(label) {
logger::root().message(logger::LOG_PERF, label_);
}
~performance_scope() {
logger::root().message(logger::LOG_PERF, "done " + label_);
}
performance_scope(const performance_scope&) = delete;
performance_scope& operator=(const performance_scope&) = delete;
};
} // namespace detail
} // namespace ifcopenshell
#define PERF(x) \
\
::ifcopenshell::logger::root().message(::ifcopenshell::logger::LOG_PERF, x); \
\
BOOST_SCOPE_EXIT(void) { \
::ifcopenshell::logger::root().message(::ifcopenshell::logger::LOG_PERF, "done " + std::string(x)); \
} \
BOOST_SCOPE_EXIT_END
#define IFCOPENSHELL_PERF_NAME_IMPL(line) ifcopenshell_performance_scope_##line
#define IFCOPENSHELL_PERF_NAME(line) IFCOPENSHELL_PERF_NAME_IMPL(line)
#define PERF(x) ::ifcopenshell::detail::performance_scope IFCOPENSHELL_PERF_NAME(__LINE__)(x)
#endif
+1 -3
View File
@@ -25,9 +25,7 @@
#include "macros.h"
#include "si_prefix.h"
#define INCLUDE_SCHEMA(x) STRINGIFY(schemas/x.h)
#include INCLUDE_SCHEMA(IfcSchema)
#undef INCLUDE_SCHEMA
#include INCLUDE_SCHEMA(schemas, IfcSchema)
#define CAT(a, b) a##b
#define EXPAND_AND_CAT(a, b) CAT(a, b)