From: Jozef M. <mis...@ho...> - 2008-04-04 14:02:51
|
> Date: Fri, 4 Apr 2008 15:53:59 +0200 > From: ms...@gm... > To: mis...@ho... > CC: pdf...@li... > Subject: Re: Using Parser > > On Fri, Apr 04, 2008 at 01:31:48PM +0000, Jozef Misutka wrote: > > > > > > Michal, can you explain this code? thx > > > > int XRefWriter::getOldStyleTrailer(Object * trailer, size_t off) > > ... > > ::Parser parser = Parser(this, > > new Lexer(NULL, str->makeSubStream(str->getPos(), gFalse, 0, &parseObj)), > > gTrue > > ); > > > > any special reason for the two constructors being executed? have you checked whether it is it safe? > > Don't understand. Which constructors? > AFAICS there is only one constructor for Parser and one for Lexer, but > this is standard construction used everywhere in the code. > Maybe I am missing something... > Could you be more concrete? your definition means that a Parser object is created and then copied to parser using copy constructor (that counts 2 ctors invoked ), was this your intention? > > -- > Michal Hocko _________________________________________________________________ Going green? See the top 12 foods to eat organic. http://green.msn.com/galleries/photos/photos.aspx?gid=164&ocid=T003MSN51N1653A |