On Wed, May 31, 2006 at 05:39:17PM +, Angus Leeming wrote:
Lars Gullik Bjønnes [EMAIL PROTECTED] writes:
| 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.
On Wed, May 31, 2006 at 05:39:17PM +, Angus Leeming wrote:
Lars Gullik Bjønnes [EMAIL PROTECTED] writes:
| 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.
Andre Poenitz [EMAIL PROTECTED] writes:
As a matter of style, yes, probably. However, for PODs there's no efficiency
penalty to i-- vis-à-vis --i.
Urban legend. There's a difference between the 'interesting' cases
whebn iterating downwards (i.e. i-- (!= 0) vs. --i = 0)
Check your
On Wed, May 31, 2006 at 05:39:17PM +, Angus Leeming wrote:
> Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
> > | > 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
>
On Wed, May 31, 2006 at 05:39:17PM +, Angus Leeming wrote:
> Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
> > | > 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
>
Andre Poenitz <[EMAIL PROTECTED]> writes:
> > As a matter of style, yes, probably. However, for PODs there's no efficiency
> > penalty to i-- vis-à-vis --i.
> Urban legend. There's a difference between the 'interesting' cases
> whebn iterating downwards (i.e. i-- (!= 0) vs. --i >= 0)
> Check
On Tue, May 30, 2006 at 05:32:19PM +, Angus Leeming wrote:
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;
+
On Tue, May 30, 2006 at 05:32:19PM +, Angus Leeming wrote:
> 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() == _) {
> > > +
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
Lars Gullik Bjønnes [EMAIL PROTECTED] writes:
| 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 =
Angus Leeming [EMAIL PROTECTED] writes:
| How was the sailing?
Windy. Parts of the trip had ~20 m/s. (Oslo - Skagen (denmark) )
The rest of the trip, sailing north along the swedish west coast was
very nice.
--
Lgb
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() == _) {
| > > + string s;
| > > +
Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
> | > 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
Angus Leeming <[EMAIL PROTECTED]> writes:
| How was the sailing?
Windy. Parts of the trip had ~20 m/s. (Oslo -> Skagen (denmark) )
The rest of the trip, sailing north along the swedish west coast was
very nice.
--
Lgb
On Sun, May 28, 2006 at 11:46:53AM +0300, Martin Vermeer wrote:
+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();
+
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
On Sun, May 28, 2006 at 11:46:53AM +0300, Martin Vermeer wrote:
> +void InsetCaption::setLabel(LCursor & cur) const
> +{
> + // Set caption label _only_ if the cursor is in _this_ float:
> + if (cur.top().text() == _) {
> + string s;
> + size_t i = cur.depth();
> +
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() == _) {
> > + string s;
> > + size_t i = cur.depth();
> > +
On Sun, May 28, 2006 at 11:46:53AM +0300, Martin Vermeer wrote:
I will presently commit the attached patch to insetcaption.[Ch]. This
prepares the way for switching to caption insets. It still doesn't enable
them... I have a separate patch in the pipeline for this.
Committed:
Slight
On Sun, May 28, 2006 at 11:46:53AM +0300, Martin Vermeer wrote:
>
> I will presently commit the attached patch to insetcaption.[Ch]. This
> prepares the way for switching to caption insets. It still doesn't enable
> them... I have a separate patch in the pipeline for this.
Committed:
I will presently commit the attached patch to insetcaption.[Ch]. This
prepares the way for switching to caption insets. It still doesn't enable
them... I have a separate patch in the pipeline for this.
- Martin
Index: insetcaption.C
I will presently commit the attached patch to insetcaption.[Ch]. This
prepares the way for switching to caption insets. It still doesn't enable
them... I have a separate patch in the pipeline for this.
- Martin
Index: insetcaption.C
22 matches
Mail list logo