diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-08 13:09:21 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-08 13:09:21 +0100 |
commit | 7755079f3900d4acbf6e639b9cb73a5a1d598f2f (patch) | |
tree | 6addd479cbfbf90a39c0cc72ddb3b0c229b71a02 /thirdparty/clipper2/patches/clipper2-exceptions.patch | |
parent | 6f51f73339004adce49ea2fef3691f57770932cc (diff) | |
parent | 973448ec4caa6f9e13ce10fe1557fc0cd068eb1d (diff) | |
download | redot-engine-7755079f3900d4acbf6e639b9cb73a5a1d598f2f.tar.gz |
Merge pull request #89025 from Chubercik/clipper2-1.3.0
clipper2: Update to 1.3.0
Diffstat (limited to 'thirdparty/clipper2/patches/clipper2-exceptions.patch')
-rw-r--r-- | thirdparty/clipper2/patches/clipper2-exceptions.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/thirdparty/clipper2/patches/clipper2-exceptions.patch b/thirdparty/clipper2/patches/clipper2-exceptions.patch new file mode 100644 index 0000000000..0e1c6585fe --- /dev/null +++ b/thirdparty/clipper2/patches/clipper2-exceptions.patch @@ -0,0 +1,38 @@ +diff --git a/thirdparty/clipper2/include/clipper2/clipper.core.h b/thirdparty/clipper2/include/clipper2/clipper.core.h +index b3dddeeaa2..a77cdad5f4 100644 +--- a/thirdparty/clipper2/include/clipper2/clipper.core.h ++++ b/thirdparty/clipper2/include/clipper2/clipper.core.h +@@ -21,6 +21,8 @@ + #include <numeric> + #include "clipper2/clipper.version.h" + ++#define CLIPPER2_THROW(exception) std::abort() ++ + namespace Clipper2Lib + { + +@@ -78,18 +80,18 @@ 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)); + } + #else +- ++error_code; // only to stop compiler warning ++ if(error_code) {}; // only to stop compiler 'parameter not used' warning + #endif + } + |