gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] gnash ChangeLog server/dlist.cpp server/dlist.h...


From: zou lunkai
Subject: Re: [Gnash-commit] gnash ChangeLog server/dlist.cpp server/dlist.h...
Date: Mon, 3 Dec 2007 15:53:54 +0800

I was very carefull at this part and made lots of tests...  You can
try with your local tests, shouldn't be worse than before:)  I am
going to update the wiki page first.

--zou



On Dec 3, 2007 3:33 PM, strk <address@hidden> wrote:
> On Mon, Dec 03, 2007 at 07:06:15AM +0000, Zou Lunkai wrote:
>
> > +void
> > +DisplayList::mergeDisplayList(DisplayList & newList)
> > +{
> > +     testInvariant();
> > +
> > +     iterator itOld = beginNonRemoved(_charsByDepth);
> > +     iterator itNew = beginNonRemoved(newList._charsByDepth);
> > +
> > +     iterator itOldEnd = staticZoneEnd(_charsByDepth);
> > +     iterator itNewEnd = staticZoneEnd(newList._charsByDepth);
> > +
> > +     while( itOld != itOldEnd )
> > +     {
> ...
> > +             while( itNew != itNewEnd )
> > +             {
> ...
> > +                             _charsByDepth.erase(itOldBack);
>
> I'm not sure it is safe to use itOldBack again after this erase
> (it' used as the while condition)
>
> > +                                     // replace the old character with the 
> > character in the new depth
> > +                                     _charsByDepth.insert(itOldBack, 
> > *itNewBack);
> > +                                     _charsByDepth.erase(itOldBack);
>
> Same here, both insert and erase would make itOldBack not point to the end 
> anymore.
>
> > +                                     
> > newList._charsByDepth.erase(itNewBack);
>
> This would apply to itNewBack...
>
> > +                             _charsByDepth.insert(itOldBack, *itNewBack );
>
> and here.
>
> > +     // unload remaining characters in old list
> > +     while( itOld != itOldEnd )
> > +     {
>
> What would itOldEnd point to after all possible modifications above ?
>
> > +     // add remaining characters in new list to the old list
> > +     if( itNew != itNewEnd )
> > +     {
>
> Same here...
>
> --strk;
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]