Re: [Path] BufferView::Pimpl::updateMetrics() simple optimization

2006-07-10 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Jean-Marc Lasgouttes wrote: +CoordCache::InnerParPosCache const & const parPos = theCoords.parPos()[text]; But parPos is modified in the loop so cannot be const. -Paragraph & par = text->getPar(pit); +Paragraph const & const par = text->getPar(pit); S

Re: [Path] BufferView::Pimpl::updateMetrics() simple optimization

2006-07-10 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> But parPos is modified in the loop so cannot be const. Indeed. >> - Paragraph & par = text->getPar(pit); + Paragraph const & const >> par = text->getPar(pit); Abdelrazak> Same here. I think should be right: - Par

Re: [Path] BufferView::Pimpl::updateMetrics() simple optimization

2006-07-10 Thread Abdelrazak Younes
Lars Gullik Bjønnes wrote: Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | - Paragraph & par = text->getPar(pit); | + Paragraph const & const par = text->getPar(pit); | | (OK, I may have added too many consts, but they do help the compiler | to generate better code, and it makes the

Re: [Path] BufferView::Pimpl::updateMetrics() simple optimization

2006-07-10 Thread Jean-Marc Lasgouttes
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: Lars> What is the difference between Lars> "Foo const & const" Lars> and Lars> "Foo const &" ?? Indeed, it seems that Foo const & is enough. I got carried away :) JMarc

Re: [Path] BufferView::Pimpl::updateMetrics() simple optimization

2006-07-10 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | - Paragraph & par = text->getPar(pit); | + Paragraph const & const par = text->getPar(pit); | | (OK, I may have added too many consts, but they do help the compiler | to generate better code, and it makes the intent of the code clearer)

Re: [Path] BufferView::Pimpl::updateMetrics() simple optimization

2006-07-10 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Hello, This simple optimization bring (subjectively) 1 Abdelrazak> second in the scroll test. I think it is a safe and non Abdelrazak> controversial improvement so I will commit now. It looks

Re: [Path] BufferView::Pimpl::updateMetrics() simple optimization

2006-07-10 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Hello, This simple optimization bring (subjectively) 1 Abdelrazak> second in the scroll test. I think it is a safe and non Abdelrazak> controversial improvement so I will commit now. It looks safe indeed. You should a

[Path] BufferView::Pimpl::updateMetrics() simple optimization

2006-07-10 Thread Abdelrazak Younes
Hello, This simple optimization bring (subjectively) 1 second in the scroll test. I think it is a safe and non controversial improvement so I will commit now. Abdel. Index: BufferView_pimpl.C === --- BufferView_pimpl.C (revision