diff options
| author | Crozet Sébastien <developer@crozet.re> | 2021-06-02 17:41:49 +0200 |
|---|---|---|
| committer | Sébastien Crozet <sebastien@crozet.re> | 2021-06-02 18:01:23 +0200 |
| commit | fdd370e51a90ff0fea82709185455b48e3841981 (patch) | |
| tree | 7de095abd05f4844c2b9938bbd0e03ddafab175b /src | |
| parent | c7b876e2f7fc69d453faf5dc6ee162eeb079aca6 (diff) | |
| download | rapier-0.9.0.tar.gz rapier-0.9.0.tar.bz2 rapier-0.9.0.zip | |
Release v0.9.0v0.9.0
Diffstat (limited to 'src')
| -rw-r--r-- | src/geometry/collider.rs | 2 | ||||
| -rw-r--r-- | src/utils.rs | 23 |
2 files changed, 14 insertions, 11 deletions
diff --git a/src/geometry/collider.rs b/src/geometry/collider.rs index 44295c4..2b82cc4 100644 --- a/src/geometry/collider.rs +++ b/src/geometry/collider.rs @@ -248,7 +248,7 @@ impl Collider { /// Retrieve the SharedShape. Also see the `shape()` function pub fn shared_shape(&self) -> &SharedShape { - &self.shape + &self.co_shape } /// Compute the axis-aligned bounding box of this collider. diff --git a/src/utils.rs b/src/utils.rs index 84ed250..f0811d6 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -670,13 +670,13 @@ impl Drop for FlushToZeroDenormalsAreZeroFlags { } } -// This is an RAII structure that disables floating point exceptions while -// it is alive, so that operations which generate NaNs and infinite values -// intentionally will not trip an exception when debugging problematic -// code that is generating NaNs and infinite values erroneously. +/// This is an RAII structure that disables floating point exceptions while +/// it is alive, so that operations which generate NaNs and infinite values +/// intentionally will not trip an exception when debugging problematic +/// code that is generating NaNs and infinite values erroneously. #[derive(Clone, Debug, PartialEq, Eq)] pub(crate) struct DisableFloatingPointExceptionsFlags { - #[cfg(feature = "avoid-fe-exceptions")] + #[cfg(feature = "debug-disable-legitimate-fe-exceptions")] // We can't get a precise size for this, because it's of type // `fenv_t`, which is a definition that doesn't exist in rust // (not even in the libc crate, as of the time of writing.) @@ -685,19 +685,22 @@ pub(crate) struct DisableFloatingPointExceptionsFlags { original_flags: [u8; 256], } -#[cfg(feature = "avoid-fe-exceptions")] +#[cfg(feature = "debug-disable-legitimate-fe-exceptions")] extern "C" { fn feholdexcept(env: *mut std::ffi::c_void); fn fesetenv(env: *const std::ffi::c_void); } impl DisableFloatingPointExceptionsFlags { - #[cfg(not(feature = "avoid-fe-exceptions"))] + #[cfg(not(feature = "debug-disable-legitimate-fe-exceptions"))] + #[allow(dead_code)] + /// Disables floating point exceptions as long as this object is not dropped. pub fn disable_floating_point_exceptions() -> Self { - Self { } + Self {} } - #[cfg(feature = "avoid-fe-exceptions")] + #[cfg(feature = "debug-disable-legitimate-fe-exceptions")] + /// Disables floating point exceptions as long as this object is not dropped. pub fn disable_floating_point_exceptions() -> Self { unsafe { let mut original_flags = [0; 256]; @@ -707,7 +710,7 @@ impl DisableFloatingPointExceptionsFlags { } } -#[cfg(feature = "avoid-fe-exceptions")] +#[cfg(feature = "debug-disable-legitimate-fe-exceptions")] impl Drop for DisableFloatingPointExceptionsFlags { fn drop(&mut self) { unsafe { |
