Mesh: disable potentially unsafe code in Wm4 library

This commit is contained in:
wmayer
2023-10-19 11:08:25 +02:00
committed by wwmayer
parent d761978387
commit eb52c5fa9a
2 changed files with 7 additions and 2 deletions

View File

@@ -69,11 +69,11 @@ public:
TRational& operator-= (const TRational& rkR);
TRational& operator*= (const TRational& rkR);
TRational& operator/= (const TRational& rkR);
#if 0
// conversions to float and double
void ConvertTo (float& rfValue) const;
void ConvertTo (double& rdValue) const;
#endif
// compute the absolute value of the rational number
TRational Abs () const;

View File

@@ -411,6 +411,7 @@ TRational<N>::TRational (float fValue)
}
}
//----------------------------------------------------------------------------
#if 0
template <int N>
void TRational<N>::ConvertTo (float& rfValue) const
{
@@ -541,6 +542,7 @@ void TRational<N>::ConvertTo (float& rfValue) const
rfValue = *(float*)&uiResult;
}
#endif
//----------------------------------------------------------------------------
template <int N>
void TRational<N>::GetPositiveFloat (const TInteger<N>& rkDenom,
@@ -696,6 +698,8 @@ TRational<N>::TRational (double dValue)
}
}
//----------------------------------------------------------------------------
// Potentially unsafe code: https://pvs-studio.com/en/blog/posts/cpp/1072/
#if 0
template <int N>
void TRational<N>::ConvertTo (double& rdValue) const
{
@@ -877,6 +881,7 @@ void TRational<N>::ConvertTo (double& rdValue) const
#endif
rdValue = *(double*)auiResult;
}
#endif
//----------------------------------------------------------------------------
template <int N>
void TRational<N>::GetPositiveDouble (const TInteger<N>& rkDenom,