aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2018-01-22 23:55:33 -0300
committerariel- <ariel-@users.noreply.github.com>2018-01-22 23:55:33 -0300
commitc099174ff777d1bf5061f5cdc197ff17bd83fbb7 (patch)
treec48689319a23398682db06558e3633759d79614f /src/server/game/AuctionHouse/AuctionHouseMgr.cpp
parent7c9722a4ae08b5f283f6a085a411e37604a7da9f (diff)
Core/Misc: fix some /W4 warnings and some reported by GCC 6.3
Diffstat (limited to 'src/server/game/AuctionHouse/AuctionHouseMgr.cpp')
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
index cf92ba1e58e..6dead9624cd 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
@@ -487,17 +487,17 @@ void AuctionHouseMgr::PendingAuctionProcess(Player* player)
}
uint32 totaldeposit = 0;
- auto itr = (*thisAH->begin());
- if (Item* item = GetAItem(itr->itemGUIDLow))
- totaldeposit = GetAuctionDeposit(itr->auctionHouseEntry, itr->etime, item, totalItems);
+ AuctionEntry const* entry = thisAH->front();
+ if (Item* item = GetAItem(entry->itemGUIDLow))
+ totaldeposit = GetAuctionDeposit(entry->auctionHouseEntry, entry->etime, item, totalItems);
uint32 depositremain = totaldeposit;
for (auto itr = thisAH->begin(); itr != thisAH->end(); ++itr)
{
AuctionEntry* AH = (*itr);
- if (next(itr) == thisAH->end())
+ if (std::next(itr) == thisAH->end())
AH->deposit = depositremain;
else
{
@@ -506,7 +506,6 @@ void AuctionHouseMgr::PendingAuctionProcess(Player* player)
}
AH->DeleteFromDB(trans);
-
AH->SaveToDB(trans);
}
@@ -710,14 +709,14 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
time_t curTime = GameTime::GetGameTime();
- PlayerGetAllThrottleMap::const_iterator itr = GetAllThrottleMap.find(player->GetGUID());
+ auto itr = GetAllThrottleMap.find(player->GetGUID());
time_t throttleTime = itr != GetAllThrottleMap.end() ? itr->second : curTime;
if (getall && throttleTime <= curTime)
{
- for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr)
+ for (AuctionEntryMap::const_iterator it = AuctionsMap.begin(); it != AuctionsMap.end(); ++it)
{
- AuctionEntry* Aentry = itr->second;
+ AuctionEntry* Aentry = it->second;
// Skip expired auctions
if (Aentry->expire_time < curTime)
continue;
@@ -737,9 +736,9 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
return;
}
- for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr)
+ for (AuctionEntryMap::const_iterator it = AuctionsMap.begin(); it != AuctionsMap.end(); ++it)
{
- AuctionEntry* Aentry = itr->second;
+ AuctionEntry* Aentry = it->second;
// Skip expired auctions
if (Aentry->expire_time < curTime)
continue;