gnash-commit
[Top][All Lists]
Advanced

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

Re: [Gnash-commit] gnash ChangeLog server/parser/movie_def_impl.cpp


From: Sandro Santilli
Subject: Re: [Gnash-commit] gnash ChangeLog server/parser/movie_def_impl.cpp
Date: Mon, 28 Aug 2006 23:51:48 +0200

On Mon, Aug 28, 2006 at 01:20:56PM +0200, Markus Gothe wrote:
> Are you sure we want to have a prefixed decrease on 'i'?
> 
> This implicates that "const import_info&      inf = m_imports[i-1];" will
> never apply to the last element in m_imports.
> 
> In my eyes:
> " for (size_t i = m_imports.size(); i > 0; i--)
>         {
>          const import_info&   inf = m_imports[i-1];"
> 
> look more correct or:

Is this any different from --i ?

> " for (size_t i = m_imports.size(); i >= 0; i--)
>         {
>          const import_info&   inf = m_imports[i];"

i >= 0 will always be true, being i an unsigned type.

A cleaner solution would be using m_imports.rbegin() and rend()

--strk;





reply via email to

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