From 3505201f3333c937b5b870d70019d400c722a69f Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 20 Apr 2008 00:50:22 +0000 Subject: 2008-04-20 Tatsuhiro Tsujikawa 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 x(...); x.reset(); TODO: test/SharedHandleTest.cc needs more tests. * src/SharedHandle.h --- src/PStringNumLoop.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/PStringNumLoop.h') diff --git a/src/PStringNumLoop.h b/src/PStringNumLoop.h index b12ad3ee..56148fcf 100644 --- a/src/PStringNumLoop.h +++ b/src/PStringNumLoop.h @@ -59,13 +59,21 @@ public: PStringNumLoop(unsigned int startValue, unsigned int endValue, unsigned int step, const NumberDecoratorHandle& nd, - const PStringDatumHandle& next = 0): + const PStringDatumHandle& next): _startValue(startValue), _endValue(endValue), _step(step), _numberDecorator(nd), _next(next) {} + PStringNumLoop(unsigned int startValue, unsigned int endValue, + unsigned int step, + const NumberDecoratorHandle& nd): + _startValue(startValue), + _endValue(endValue), + _step(step), + _numberDecorator(nd) {} + virtual ~PStringNumLoop() {} virtual void accept(PStringVisitor* visitor) -- cgit