Require -std=c++11 and use std::shared_ptr instead of SharedHandle

This commit is contained in:
Tatsuhiro Tsujikawa 2013-06-22 01:10:38 +09:00
parent 126a4bde61
commit 07d270c87e
709 changed files with 6305 additions and 6878 deletions

View file

@ -33,7 +33,7 @@ void LpdMessageReceiverTest::testReceiveMessage()
LpdMessageReceiver rcv(LPD_MULTICAST_ADDR, LPD_MULTICAST_PORT);
CPPUNIT_ASSERT(rcv.init(""));
SharedHandle<SocketCore> sendsock(new SocketCore(SOCK_DGRAM));
std::shared_ptr<SocketCore> sendsock(new SocketCore(SOCK_DGRAM));
sendsock->create(AF_INET);
// Mingw32 build needs to set interface explicitly.
sendsock->setMulticastInterface("");
@ -50,7 +50,7 @@ void LpdMessageReceiverTest::testReceiveMessage()
LPD_MULTICAST_ADDR, LPD_MULTICAST_PORT);
rcv.getSocket()->isReadable(5);
SharedHandle<LpdMessage> msg = rcv.receiveMessage();
std::shared_ptr<LpdMessage> msg = rcv.receiveMessage();
CPPUNIT_ASSERT(msg);
CPPUNIT_ASSERT_EQUAL(std::string("cd41c7fdddfd034a15a04d7ff881216e01c4ceaf"),
util::toHex(msg->infoHash));