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
> "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
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
> "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
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)
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
> "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
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