refactor(Core/Misc): ceil() to std::ceil() (#9791)

- prefer std functions over C functions
This commit is contained in:
Kitzunu
2022-01-03 14:11:39 +01:00
committed by GitHub
parent 61649b7e6d
commit f04709a326
8 changed files with 13 additions and 13 deletions

View File

@@ -5926,7 +5926,7 @@ bool Player::RewardHonor(Unit* uVictim, uint32 groupsize, int32 honor, bool awar
else
victim_guid.Clear(); // Don't show HK: <rank> message, only log.
honor_f = ceil(Acore::Honor::hk_honor_at_level_f(k_level) * (v_level - k_grey) / (k_level - k_grey));
honor_f = std::ceil(Acore::Honor::hk_honor_at_level_f(k_level) * (v_level - k_grey) / (k_level - k_grey));
// count the number of playerkills in one day
ApplyModUInt32Value(PLAYER_FIELD_KILLS, 1, true);
@@ -12129,7 +12129,7 @@ uint32 Player::GetCorpseReclaimDelay(bool pvp) const
time_t now = time(nullptr);
// 0..2 full period
// should be ceil(x)-1 but not floor(x)
// should be std::ceil(x)-1 but not floor(x)
uint64 count = (now < m_deathExpireTime - 1) ? (m_deathExpireTime - 1 - now) / DEATH_EXPIRE_STEP : 0;
return copseReclaimDelay[count];
}