2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Rewritten SharedHandle. Now copy constructor taking raw pointer 
has
	keyword explicit and SharedHandle's default constructor 
initializes
	its internal obj to null, old implementation initializes it 
using
	obj's default constructor.
	To assign null, write SharedHandle<T> x(...); x.reset();
	TODO: test/SharedHandleTest.cc needs more tests.
	* src/SharedHandle.h
This commit is contained in:
Tatsuhiro Tsujikawa 2008-04-20 00:50:22 +00:00
parent 99733a84e2
commit 3505201f33
262 changed files with 2106 additions and 1843 deletions

View file

@ -55,10 +55,6 @@ DHTEntryPointNameResolveCommand::DHTEntryPointNameResolveCommand(int32_t cuid, D
Command(cuid),
_e(e),
_resolver(new NameResolver()),
_taskQueue(0),
_taskFactory(0),
_routingTable(0),
_localNode(0),
_entryPoints(entryPoints),
_bootstrapEnabled(false)
{}
@ -120,7 +116,7 @@ bool DHTEntryPointNameResolveCommand::execute()
void DHTEntryPointNameResolveCommand::addPingTask(const std::pair<std::string, uint16_t>& addr)
{
SharedHandle<DHTNode> entryNode = new DHTNode();
SharedHandle<DHTNode> entryNode(new DHTNode());
entryNode->setIPAddress(addr.first);
entryNode->setPort(addr.second);