mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-19 21:10:12 +02:00
auto_ptr -> shared_ptr see http://gcc.gnu.org/onlinedocs/libstdc++/manual/auto_ptr.html
This commit is contained in:
parent
9621cbcaa7
commit
ebacb433fe
@ -376,7 +376,7 @@ void CClient::newGame( CConnection *con, StartInfo *si )
|
|||||||
battleints[color] = playerint[color];
|
battleints[color] = playerint[color];
|
||||||
|
|
||||||
playerint[color]->init(cb);
|
playerint[color]->init(cb);
|
||||||
callbacks[color] = std::auto_ptr<CCallback>(cb);
|
callbacks[color] = boost::shared_ptr<CCallback>(cb);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -463,7 +463,7 @@ void CClient::serialize( Handler &h, const int version )
|
|||||||
else
|
else
|
||||||
nInt = new CPlayerInterface(pid);
|
nInt = new CPlayerInterface(pid);
|
||||||
|
|
||||||
callbacks[pid] = std::auto_ptr<CCallback>(new CCallback(gs,pid,this));
|
callbacks[pid] = boost::shared_ptr<CCallback>(new CCallback(gs,pid,this));
|
||||||
battleints[pid] = playerint[pid] = nInt;
|
battleints[pid] = playerint[pid] = nInt;
|
||||||
nInt->init(callbacks[pid].get());
|
nInt->init(callbacks[pid].get());
|
||||||
nInt->serialize(h, version);
|
nInt->serialize(h, version);
|
||||||
|
@ -64,7 +64,7 @@ class CClient : public IGameCallback
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CCallback *cb;
|
CCallback *cb;
|
||||||
std::map<ui8,std::auto_ptr<CCallback> > callbacks; //callbacks given to player interfaces
|
std::map<ui8,boost::shared_ptr<CCallback> > callbacks; //callbacks given to player interfaces
|
||||||
std::vector<IGameEventsReceiver*> privilagedGameEventReceivers; //scripting modules, spectator interfaces
|
std::vector<IGameEventsReceiver*> privilagedGameEventReceivers; //scripting modules, spectator interfaces
|
||||||
std::vector<IBattleEventsReceiver*> privilagedBattleEventReceivers; //scripting modules, spectator interfaces
|
std::vector<IBattleEventsReceiver*> privilagedBattleEventReceivers; //scripting modules, spectator interfaces
|
||||||
std::map<ui8,CGameInterface *> playerint;
|
std::map<ui8,CGameInterface *> playerint;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user