This PR protects two methods of the IntStat class in case statistics are disabled.
void IntStat::maxAssign(int64_t val)
{
- if (d_data->d_value < val)
+ if constexpr (Configuration::isStatisticsBuild())
{
- d_data->d_value = val;
+ if (d_data->d_value < val)
+ {
+ d_data->d_value = val;
+ }
}
}
void IntStat::minAssign(int64_t val)
{
- if (d_data->d_value > val)
+ if constexpr (Configuration::isStatisticsBuild())
{
- d_data->d_value = val;
+ if (d_data->d_value > val)
+ {
+ d_data->d_value = val;
+ }
}
}