refactor(Core/Misc): abs() to std::abs() (#9789)

This commit is contained in:
Kitzunu 2021-12-31 23:29:39 +01:00 committed by GitHub
parent fe9305c724
commit ac99eb48e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 60 additions and 60 deletions

View file

@ -4399,7 +4399,7 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
// Random Property Exist - try found basepoints for spell (basepoints depends from item suffix factor)
if (item->GetItemRandomPropertyId())
{
ItemRandomSuffixEntry const* item_rand = sItemRandomSuffixStore.LookupEntry(abs(item->GetItemRandomPropertyId()));
ItemRandomSuffixEntry const* item_rand = sItemRandomSuffixStore.LookupEntry(std::abs(item->GetItemRandomPropertyId()));
if (item_rand)
{
// Search enchant_amount
@ -4426,7 +4426,7 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
case ITEM_ENCHANTMENT_TYPE_RESISTANCE:
if (!enchant_amount)
{
ItemRandomSuffixEntry const* item_rand = sItemRandomSuffixStore.LookupEntry(abs(item->GetItemRandomPropertyId()));
ItemRandomSuffixEntry const* item_rand = sItemRandomSuffixStore.LookupEntry(std::abs(item->GetItemRandomPropertyId()));
if (item_rand)
{
for (int k = 0; k < MAX_ITEM_ENCHANTMENT_EFFECTS; ++k)
@ -4446,7 +4446,7 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
{
if (!enchant_amount)
{
ItemRandomSuffixEntry const* item_rand_suffix = sItemRandomSuffixStore.LookupEntry(abs(item->GetItemRandomPropertyId()));
ItemRandomSuffixEntry const* item_rand_suffix = sItemRandomSuffixStore.LookupEntry(std::abs(item->GetItemRandomPropertyId()));
if (item_rand_suffix)
{
for (int k = 0; k < MAX_ITEM_ENCHANTMENT_EFFECTS; ++k)
@ -5215,7 +5215,7 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, CharacterDatabaseQueryHolder cons
map = sMapMgr->CreateMap(mapId, this);
if (map)
{
auto bounds = map->GetGameObjectBySpawnIdStore().equal_range(abs(transLowGUID));
auto bounds = map->GetGameObjectBySpawnIdStore().equal_range(std::abs(transLowGUID));
if (bounds.first != bounds.second)
transGO = bounds.first->second->ToTransport();
}