initial commit, 4.5 stable
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
This commit is contained in:
42
thirdparty/clipper2/patches/0001-disable-exceptions.patch
vendored
Normal file
42
thirdparty/clipper2/patches/0001-disable-exceptions.patch
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
diff --git a/thirdparty/clipper2/include/clipper2/clipper.core.h b/thirdparty/clipper2/include/clipper2/clipper.core.h
|
||||
index ab71aeb072..110bee4c10 100644
|
||||
--- a/thirdparty/clipper2/include/clipper2/clipper.core.h
|
||||
+++ b/thirdparty/clipper2/include/clipper2/clipper.core.h
|
||||
@@ -19,6 +19,8 @@
|
||||
#include <numeric>
|
||||
#include <cmath>
|
||||
|
||||
+#define CLIPPER2_THROW(exception) std::abort()
|
||||
+
|
||||
namespace Clipper2Lib
|
||||
{
|
||||
|
||||
@@ -76,21 +78,21 @@ namespace Clipper2Lib
|
||||
switch (error_code)
|
||||
{
|
||||
case precision_error_i:
|
||||
- throw Clipper2Exception(precision_error);
|
||||
+ CLIPPER2_THROW(Clipper2Exception(precision_error));
|
||||
case scale_error_i:
|
||||
- throw Clipper2Exception(scale_error);
|
||||
+ CLIPPER2_THROW(Clipper2Exception(scale_error));
|
||||
case non_pair_error_i:
|
||||
- throw Clipper2Exception(non_pair_error);
|
||||
+ CLIPPER2_THROW(Clipper2Exception(non_pair_error));
|
||||
case undefined_error_i:
|
||||
- throw Clipper2Exception(undefined_error);
|
||||
+ CLIPPER2_THROW(Clipper2Exception(undefined_error));
|
||||
case range_error_i:
|
||||
- throw Clipper2Exception(range_error);
|
||||
+ CLIPPER2_THROW(Clipper2Exception(range_error));
|
||||
// Should never happen, but adding this to stop a compiler warning
|
||||
default:
|
||||
- throw Clipper2Exception("Unknown error");
|
||||
+ CLIPPER2_THROW(Clipper2Exception("Unknown error"));
|
||||
}
|
||||
#else
|
||||
- ++error_code; // only to stop compiler warning
|
||||
+ if(error_code) {}; // only to stop compiler 'parameter not used' warning
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user