mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 10:55:32 +08:00
Assert that infinite quantity is not allowed
This commit is contained in:
@@ -71,6 +71,7 @@ namespace BlackMisc::PhysicalQuantities
|
|||||||
m_value(unit.isNull() ? 0.0 : value), m_unit(unit)
|
m_value(unit.isNull() ? 0.0 : value), m_unit(unit)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(!std::isnan(value), Q_FUNC_INFO, "nan value");
|
Q_ASSERT_X(!std::isnan(value), Q_FUNC_INFO, "nan value");
|
||||||
|
Q_ASSERT_X(!std::isinf(value), Q_FUNC_INFO, "infinity");
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class MU, class PQ>
|
template <class MU, class PQ>
|
||||||
|
|||||||
Reference in New Issue
Block a user