Fix warning C4275

It's not enough to disable this warning by adding /wd4257 at build time because it's triggered when the library is consumed.
This commit is contained in:
Osyotr
2025-10-03 14:00:20 +00:00
committed by Thomas Krijnen
parent 02713dbd39
commit 066326ab3b
9 changed files with 61 additions and 17 deletions
+13
View File
@@ -655,6 +655,12 @@ namespace ifcopenshell {
// @todo find a place
namespace IfcGeom {
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable: 4275)
#endif
class IFC_GEOM_API geometry_exception : public std::runtime_error {
protected:
std::string message;
@@ -662,12 +668,19 @@ namespace IfcGeom {
geometry_exception(const std::string& m)
: std::runtime_error(m)
{}
~geometry_exception() override;
};
class IFC_GEOM_API too_many_faces_exception : public geometry_exception {
public:
too_many_faces_exception()
: geometry_exception("Too many faces for operation") {}
~too_many_faces_exception() override;
};
}
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
#endif