diff --git a/client/Client.cpp b/client/Client.cpp index 2a5b70408..fdd8729c5 100644 --- a/client/Client.cpp +++ b/client/Client.cpp @@ -376,7 +376,7 @@ void CClient::newGame( CConnection *con, StartInfo *si ) battleints[color] = playerint[color]; playerint[color]->init(cb); - callbacks[color] = std::auto_ptr(cb); + callbacks[color] = boost::shared_ptr(cb); } else { @@ -463,7 +463,7 @@ void CClient::serialize( Handler &h, const int version ) else nInt = new CPlayerInterface(pid); - callbacks[pid] = std::auto_ptr(new CCallback(gs,pid,this)); + callbacks[pid] = boost::shared_ptr(new CCallback(gs,pid,this)); battleints[pid] = playerint[pid] = nInt; nInt->init(callbacks[pid].get()); nInt->serialize(h, version); diff --git a/client/Client.h b/client/Client.h index 54b763462..617ef3507 100644 --- a/client/Client.h +++ b/client/Client.h @@ -64,7 +64,7 @@ class CClient : public IGameCallback { public: CCallback *cb; - std::map > callbacks; //callbacks given to player interfaces + std::map > callbacks; //callbacks given to player interfaces std::vector privilagedGameEventReceivers; //scripting modules, spectator interfaces std::vector privilagedBattleEventReceivers; //scripting modules, spectator interfaces std::map playerint;