ParIterator::operator==
Richard Kimberly Heck
rikiheck at lyx.org
Fri Nov 6 16:29:15 UTC 2020
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 what about:
bool operator==(ParConstIterator const & iter1, ParConstIterator const &
iter2)
{
DocIterator const * dit1 = &iter1;
DocIterator const * dit2 = &iter2;
return *dit1 == *dit2;
}
? That should work, yes? It does compile...
Is this a method we would like to have? If not, I'd propose just to
remove the dead code.
Riki
More information about the lyx-devel
mailing list