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
+7 -10
View File
@@ -857,7 +857,6 @@ void svg_serializer::write(const ifcopenshell::geom::native_element* brep_obj) {
double pu, pv;
Extrema_ExtPElS ext;
ext.Perform(gp::Origin(), *pln, 1.e-5);
auto P0 = pln->Location();
pln->SetLocation(ext.Point(1).Value());
ext.Point(1).Parameter(pu, pv);
@@ -896,7 +895,6 @@ void svg_serializer::write(const ifcopenshell::geom::native_element* brep_obj) {
}
{
bool any_wires_converted_to_face = false;
BRep_Builder BB;
TopoDS_Compound comp2;
BB.MakeCompound(comp2);
@@ -908,7 +906,6 @@ void svg_serializer::write(const ifcopenshell::geom::native_element* brep_obj) {
TopoDS_Compound faces;
ifcopenshell::geom::util::convert_wire_to_faces(TopoDS::Wire(s), faces, wts);
BB.Add(comp2, faces);
any_wires_converted_to_face = true;
} else {
BB.Add(comp2, s);
}
@@ -1132,7 +1129,7 @@ void svg_serializer::write(const geometry_data& data) {
section_heights_used = section_data_ ? std::addressof(*section_data_) : nullptr;
} else {
if (data.storey) {
section_heights_storage.push_back(horizontal_plan{ data.storey, data.storey_elevation, +1. });
section_heights_storage.push_back(horizontal_plan{ data.storey, data.storey_elevation, +1., std::numeric_limits<double>::infinity() });
} else {
logger().warning("SER", 24, "No global section height and unable to determine building storey for:", data.product);
return;
@@ -2456,14 +2453,14 @@ void svg_serializer::finalize() {
gp_Pnt((xmin + xmax) / 2., (ymin + ymax) / 2., 0.),
gp_Dir(-1, 0, 0),
gp_Dir(0, -1, 0)));
deferred_section_data_->push_back(vertical_section{ pln , "Section North South", true });
deferred_section_data_->push_back(vertical_section{ pln , "Section North South", true, std::nullopt, std::nullopt });
}
{
gp_Pln pln(gp_Ax3(
gp_Pnt((xmin + xmax) / 2., (ymin + ymax) / -2., 0.),
gp_Dir(0, -1, 0),
gp_Dir(1, 0, 0)));
deferred_section_data_->push_back(vertical_section{ pln , "Section East West", true });
deferred_section_data_->push_back(vertical_section{ pln , "Section East West", true, std::nullopt, std::nullopt });
}
}
@@ -2473,28 +2470,28 @@ void svg_serializer::finalize() {
gp_Pnt(0., -(ymin - 0.1), 0.),
gp_Dir(0, 1, 0),
gp_Dir(-1, 0, 0)));
deferred_section_data_->push_back(vertical_section{ pln , "Elevation South", true });
deferred_section_data_->push_back(vertical_section{ pln , "Elevation South", true, std::nullopt, std::nullopt });
}
{
gp_Pln pln(gp_Ax3(
gp_Pnt(xmax + 0.1, 0., 0.),
gp_Dir(1, 0, 0),
gp_Dir(0, 1, 0)));
deferred_section_data_->push_back(vertical_section{ pln , "Elevation East", true });
deferred_section_data_->push_back(vertical_section{ pln , "Elevation East", true, std::nullopt, std::nullopt });
}
{
gp_Pln pln(gp_Ax3(
gp_Pnt(0., -(ymax + 0.1), 0.),
gp_Dir(0, -1, 0),
gp_Dir(1, 0, 0)));
deferred_section_data_->push_back(vertical_section{ pln , "Elevation North", true });
deferred_section_data_->push_back(vertical_section{ pln , "Elevation North", true, std::nullopt, std::nullopt });
}
{
gp_Pln pln(gp_Ax3(
gp_Pnt(xmin - 0.1, 0., 0.),
gp_Dir(-1, 0, 0),
gp_Dir(0, -1, 0)));
deferred_section_data_->push_back(vertical_section{ pln , "Elevation West", true });
deferred_section_data_->push_back(vertical_section{ pln , "Elevation West", true, std::nullopt, std::nullopt });
}
}
+5 -5
View File
@@ -385,12 +385,12 @@ namespace {
public:
prefiltered_hlr(ifcopenshell::logger& logger, bool use_prefiltering, bool use_hlr_poly, bool segment_projection, const gp_Pln& view_direction)
: logger_(logger)
, use_prefiltering_(use_prefiltering)
: use_prefiltering_(use_prefiltering)
, use_hlr_poly_(use_hlr_poly)
, segment_projection_(segment_projection)
// @nb negative z in accordance with occt projector convention (and opengl)
, view_direction_(view_direction.Axis())
, logger_(logger)
{
if (use_hlr_poly_) {
engine_ = new HLRBRep_PolyAlgo;
@@ -648,9 +648,9 @@ public:
, polygonal_(false)
, emit_building_storeys_(true)
, no_css_(false)
, unify_inputs_(false)
, mirror_y_(false)
, mirror_x_(false)
, unify_inputs_(false)
, profile_threshold_(-1)
, svg_ridge_angle_min_deg_(45.)
, svg_valley_angle_min_deg_(12.)
@@ -774,7 +774,7 @@ public:
only_valid_ = b;
}
bool getOnlyValid(bool b) const {
bool getOnlyValid(bool) const {
return only_valid_;
}
@@ -795,7 +795,7 @@ public:
void addDrawing(const gp_Pnt& pos, const gp_Dir& dir, const gp_Dir& ref, const std::string& name, bool include_projection) {
deferred_section_data_.emplace();
deferred_section_data_->push_back(vertical_section{ gp_Pln(gp_Ax3(pos, dir, ref)), name, include_projection });
deferred_section_data_->push_back(vertical_section{ gp_Pln(gp_Ax3(pos, dir, ref)), name, include_projection, std::nullopt, std::nullopt });
}
void setSubtractionSettings(subtract_before_project sbp) {
+9 -9
View File
@@ -215,7 +215,7 @@ namespace {
<< std::hex << std::setw(4) << std::setfill('0')
<< (c & 0xFFFF);
} else {
escaped.put(c);
escaped.put(static_cast<char>(c));
}
break;
}
@@ -339,7 +339,7 @@ void ttl_wkt_serializer::write(const ifcopenshell::geom::triangulation_element*
} else {
filename_.stream << ttl_object_id(o, "_geometry") << " a geo:Geometry ;\n";
bool force_2d = true;
double z_value;
double z_value = 0.;
for (size_t i = 2; i < o->geometry().verts().size(); i += 3) {
const auto& cur = o->geometry().verts()[i];
if (i == 2) {
@@ -457,18 +457,18 @@ void ttl_wkt_serializer::write(const ifcopenshell::geom::native_element* brep_ob
BRepGProp::SurfaceProperties(face, props);
auto area = props.Mass();
BRepTools_WireExplorer it(wire);
BRepTools_WireExplorer wire_it(wire);
std::vector<double> loop_coords;
for (; it.More(); it.Next()) {
const auto& v = it.CurrentVertex();
for (; wire_it.More(); wire_it.Next()) {
const auto& v = wire_it.CurrentVertex();
auto pnt = BRep_Tool::Pnt(v);
loop_coords.push_back(pnt.X());
loop_coords.push_back(pnt.Y());
loop_coords.push_back(pnt.Z());
}
std::vector<int> loop_idxs(loop_coords.size() / 3);
for (int i = 0; i < loop_idxs.size(); ++i) {
loop_idxs[i] = i;
for (std::size_t loop_index = 0; loop_index < loop_idxs.size(); ++loop_index) {
loop_idxs[loop_index] = static_cast<int>(loop_index);
}
std::string postfix = "_section_geometry_" + std::to_string(N++);
@@ -509,7 +509,7 @@ std::string ttl_wkt_serializer::ttl_object_id(const ifcopenshell::geom::element*
{
auto oid = boost::replace_all_copy(object_id(o), "-", "_");
if (oid.find('$') == std::string::npos) {
return "base:" + oid + (postfix ? postfix : (const char* const)"");
return "base:" + oid + (postfix ? postfix : "");
} else {
std::string base;
if (settings_.get<ifcopenshell::geom::settings::BaseUri>().has()) {
@@ -517,7 +517,7 @@ std::string ttl_wkt_serializer::ttl_object_id(const ifcopenshell::geom::element*
} else {
base = "http://example.org/";
}
return "<" + base + oid + (postfix ? postfix : (const char* const)"") + ">";
return "<" + base + oid + (postfix ? postfix : "") + ">";
}
}