On Tue, Nov 08, 2005 at 09:56:11AM +0100, Jean-Marc Lasgouttes wrote:
> >>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:
> 
> Martin> Attached.
> 
> It look good, except that I am surprised that
> +     pit_type pit = pars_.size();
> +     for (pit_type it = 0; it < pars_.size(); ++it) {
> +             if (&pars_[it] == &par)
> +                     pit = it;
> +     }
> cannot be replaced by something like
>        pit = pars_.find(par);

I tried that, and got

text2.C:198: error: 'const class ParagraphList' has no member named
'find'

Then I tried std::find, and got no further. Tried:

    198         ParagraphList::iterator p = std::find(pars_[0], 
pars_[pars_.size()],
    199                 par);

Got:

text2.C:199: error: conversion from `Paragraph' to non-scalar type
`__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<Paragraph*,
__gnu_norm::vector<Paragraph, std::allocator<Paragraph> > >,
__gnu_debug_def::vector<Paragraph, std::allocator<Paragraph> > >'
requested

STL doesn't like me :-(

Next idea please...
 
> Martin> BTW I saw one more near-replica of the outerFont code in
> Martin> text2.C. Shouldn't we unify this stuff? This reminds me of the
> Martin> human genome ;-)
> 
> What would it look like?

Very similar looking sequences repeated in different places. The
sequence I refer to is in text2.C/setCharFont.
 
> There is also one place in the code where a call to outerFont is
> commented out. Could you check whether it is useful after all?

Yes I know. I have no idea when it is being called. I tried first to
enable this, but it had no effect on bug 2015.

- Martin

Attachment: pgpdsUZEiGgNm.pgp
Description: PGP signature

Reply via email to