Andre Poenitz <[EMAIL PROTECTED]> writes:
> > +void InsetCaption::setLabel(LCursor & cur) const
> > +{
> > +   // Set caption label _only_ if the cursor is in _this_ float:
> > +   if (cur.top().text() == &text_) {
> > +           string s; 
> > +           size_t i = cur.depth();
> > +                   while (i > 0) {
> > +                           --i;

> Probably not your doing, but: Indentation of the loop is off.
> Apart from it can be shortened by two lines:
>  for (size_t i = cur.depth(); i--; )

Now you're just being evil, André ;-) At least be explicit about the exit
condition. I *think* that your code is equivalent to:

   for (size_t i = cur.depth(); i > 0; i--)

I *think* I've convinced myself that the two for statements are the same, but
I've definitely bruised some brain cells in the process.

Angus


Reply via email to