mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 06:36:24 +00:00
feat(Core/Misc): remove ACE Auto_Ptr (#3454)
This commit is contained in:
@@ -300,7 +300,7 @@ void Item::UpdateDuration(Player* owner, uint32 diff)
|
||||
|
||||
void Item::SaveToDB(SQLTransaction& trans)
|
||||
{
|
||||
bool isInTransaction = !(trans.null());
|
||||
bool isInTransaction = static_cast<bool>(trans);
|
||||
if (!isInTransaction)
|
||||
trans = CharacterDatabase.BeginTransaction();
|
||||
|
||||
@@ -1135,12 +1135,11 @@ void Item::SaveRefundDataToDB()
|
||||
|
||||
void Item::DeleteRefundDataFromDB(SQLTransaction* trans)
|
||||
{
|
||||
if (trans && !trans->null())
|
||||
if (trans)
|
||||
{
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEM_REFUND_INSTANCE);
|
||||
stmt->setUInt32(0, GetGUIDLow());
|
||||
(*trans)->Append(stmt);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7514,7 +7514,7 @@ void Player::ModifyHonorPoints(int32 value, SQLTransaction* trans /*=NULL*/)
|
||||
newValue = 0;
|
||||
SetHonorPoints(uint32(newValue));
|
||||
|
||||
if (trans && !trans->null())
|
||||
if (trans)
|
||||
{
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UDP_CHAR_HONOR_POINTS);
|
||||
stmt->setUInt32(0, newValue);
|
||||
@@ -7530,7 +7530,7 @@ void Player::ModifyArenaPoints(int32 value, SQLTransaction* trans /*=NULL*/)
|
||||
newValue = 0;
|
||||
SetArenaPoints(uint32(newValue));
|
||||
|
||||
if (trans && !trans->null())
|
||||
if (trans)
|
||||
{
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UDP_CHAR_ARENA_POINTS);
|
||||
stmt->setUInt32(0, newValue);
|
||||
@@ -20125,7 +20125,7 @@ void Player::_SaveMail(SQLTransaction& trans)
|
||||
|
||||
void Player::_SaveQuestStatus(SQLTransaction& trans)
|
||||
{
|
||||
bool isTransaction = !trans.null();
|
||||
bool isTransaction = static_cast<bool>(trans);
|
||||
if (!isTransaction)
|
||||
trans = CharacterDatabase.BeginTransaction();
|
||||
|
||||
|
||||
@@ -12,17 +12,17 @@
|
||||
#include "Weather.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "AutoPtr.h"
|
||||
#include "Player.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
#include <memory>
|
||||
|
||||
namespace WeatherMgr
|
||||
{
|
||||
|
||||
namespace
|
||||
{
|
||||
typedef std::unordered_map<uint32, acore::AutoPtr<Weather, ACE_Null_Mutex> > WeatherMap;
|
||||
typedef std::unordered_map<uint32, std::unique_ptr<Weather>> WeatherMap;
|
||||
typedef std::unordered_map<uint32, WeatherData> WeatherZoneMap;
|
||||
|
||||
WeatherMap m_weathers;
|
||||
|
||||
Reference in New Issue
Block a user