From 7f3be4ae6a881ec7b69040fcff3aeeb6cdab85af Mon Sep 17 00:00:00 2001 From: ApoC Date: Sat, 20 Jun 2009 01:43:04 +0200 Subject: [PATCH] [8047] Little cleanup in C++ manner. Signed-off-by: ApoC --- src/game/Player.cpp | 4 +--- src/shared/revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 79e1685f5..9351680f5 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -17139,7 +17139,6 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint if (bagguid != NULL_BAG && slot != NULL_SLOT) { - Bag *pBag; if( bagguid == GetGUID() ) { bag = INVENTORY_SLOT_BAG_0; @@ -17148,8 +17147,7 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint { for (int i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END;++i) { - pBag = (Bag*)GetItemByPos(INVENTORY_SLOT_BAG_0,i); - if( pBag ) + if( Bag *pBag = (Bag*)GetItemByPos(INVENTORY_SLOT_BAG_0,i) ) { if( bagguid == pBag->GetGUID() ) { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 81766e366..b2642881c 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8046" + #define REVISION_NR "8047" #endif // __REVISION_NR_H__