@@ -28,6 +28,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
28
#include " common/debug/Debug.hpp"
29
29
#include < limits>
30
30
#include < type_traits>
31
+ #include " Probe.h"
31
32
32
33
template <typename T, typename TUnder = unsigned int , int TRatio = T::ratio>
33
34
class Unit
@@ -68,8 +69,8 @@ class Unit
68
69
template <typename R>
69
70
Unit<T, TUnder> operator =(Unit<R, TUnder> other)
70
71
{
71
- assert ( other.m_value % T::ratio == 0 &&
72
- " Invalid assignment: resulting count is not a whole number" );
72
+ IGC_ASSERT ( other.m_value % T::ratio == 0 &&
73
+ " Invalid assignment: resulting count is not a whole number" );
73
74
this ->m_value = other.m_value ;
74
75
return *this ;
75
76
}
@@ -146,7 +147,7 @@ class Unit
146
147
}
147
148
else
148
149
{
149
- assert ( 0 && " Corrupted value of a unit, should be a multiple of the ratio." );
150
+ IGC_ASSERT ( 0 && " Corrupted value of a unit, should be a multiple of the ratio." );
150
151
return 0 ;
151
152
}
152
153
}
@@ -219,8 +220,8 @@ class Unit
219
220
" Size of the unit on the right hand side of operator + must be equal to"
220
221
" or a multiple of the left-hand unit size." );
221
222
222
- assert ( (other.m_value % T::ratio == 0 ) &&
223
- " Invalid addition: resulting count is not a whole number" );
223
+ IGC_ASSERT ( (other.m_value % T::ratio == 0 ) &&
224
+ " Invalid addition: resulting count is not a whole number" );
224
225
Unit<T, TUnder> res;
225
226
res.m_value = this ->m_value + other.m_value ;
226
227
return res;
@@ -236,8 +237,8 @@ class Unit
236
237
" Size of the unit on the right hand side of operator- must be equal to"
237
238
" or a multiple of the left-hand unit size." );
238
239
239
- assert ( (other.m_value % T::ratio == 0 ) &&
240
- " Invalid subtraction: resulting count is not a whole number" );
240
+ IGC_ASSERT ( (other.m_value % T::ratio == 0 ) &&
241
+ " Invalid subtraction: resulting count is not a whole number" );
241
242
Unit<T, TUnder> res;
242
243
res.m_value = this ->m_value - other.m_value ;
243
244
return res;
@@ -253,8 +254,8 @@ class Unit
253
254
" Size of the unit on the right hand side of operator- must be equal to"
254
255
" or a multiple of the left-hand unit size." );
255
256
256
- assert ( (other.m_value % T::ratio == 0 ) &&
257
- " Invalid subtraction: resulting count is not a whole number" );
257
+ IGC_ASSERT ( (other.m_value % T::ratio == 0 ) &&
258
+ " Invalid subtraction: resulting count is not a whole number" );
258
259
Unit<T, TUnder> res;
259
260
res.m_value = other.m_value - this ->m_value ;
260
261
return res;
0 commit comments