I'm happy to have someone commit a new version. Mostly, I was just
surprised by the comment. It seemed like there must be some way to
compare these as DocIterators without doing a copy. So it turns out
there are many!
Riki
I've committed it. Also commented out it, as was suggested by Jean-Marc.
On 11/8/20 3:57 AM, Yuriy Skalko wrote:
>> Isn't there a way with a xxx_cast too ? (maybe reinterpret_cast<> ?)
>>
>> JMarc
>
> Yes, here is another one with casting:
>
> bool operator==(ParConstIterator const & iter1, ParConstIterator const
> & iter2)
> {
> return static_cast(iter1) ==
> stati
Isn't there a way with a xxx_cast too ? (maybe reinterpret_cast<> ?)
JMarc
Yes, here is another one with casting:
bool operator==(ParConstIterator const & iter1, ParConstIterator const &
iter2)
{
return static_cast(iter1) ==
static_cast(iter2);
}
Yuriy
--
lyx-devel mailing list
lyx-devel
Le 07/11/2020 à 15:55, Yuriy Skalko a écrit :
I'm not a C++ guru, but seems like nothing wrong with this code assuming
Dociterator's operator== is right.
It can be further simplified to this:
bool operator==(ParConstIterator const & iter1, ParConstIterator const &
iter2)
{
DocIterator c
This method is commented out ostensibly because the current
implementation
bool operator==(ParConstIterator const & iter1, ParConstIterator
const & iter2)
{
// FIXME: this makes two full copies!
return DocIterator(iter1) == DocIterator(iter2);
}
made two copies, so was expensive. But w
On 11/6/20 7:37 PM, Jean-Marc Lasgouttes wrote:
> Le 06/11/2020 à 17:29, Richard Kimberly Heck a écrit :
>> This method is commented out ostensibly because the current
>> implementation
>>
>> bool operator==(ParConstIterator const & iter1, ParConstIterator
>> const & iter2)
>> {
>> // FIXME: t
On 11/6/20 7:37 PM, Jean-Marc Lasgouttes wrote:
> Le 06/11/2020 à 17:29, Richard Kimberly Heck a écrit :
>> This method is commented out ostensibly because the current
>> implementation
>>
>> bool operator==(ParConstIterator const & iter1, ParConstIterator
>> const & iter2)
>> {
>> // FIXME: t
Le 06/11/2020 à 17:29, Richard Kimberly Heck a écrit :
This method is commented out ostensibly because the current implementation
bool operator==(ParConstIterator const & iter1, ParConstIterator const &
iter2)
{
// FIXME: this makes two full copies!
return DocIterator(iter1) == DocIt
Andre Poenitz <[EMAIL PROTECTED]> writes:
| ... should yield a Paragraph &, not a ParagraphList::iterator.
|
| Patch attached.
|
| Lars?
Yea... ok.
--
Lgb