Angus Leeming <[EMAIL PROTECTED]> writes: | 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--)
but then we want '--i' as well. -- Lgb