[PATCH] Add move constructor and move assignment operator for, FileName class
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Thu Oct 3 22:54:43 UTC 2024
This is my take on this patch from yuriy, after 854c9de8 had to be
reverted. See discussion here:
https://marc.info/?t=161018438900002&r=2&w=2
In the case of move constructor, instead of setting the Private
pointer of the moved FileName to nullptr, set it to a pointer to a
static FileName::Private object. This is needed because the rvalue
should still be a valid object after a move operation.
Note that this is a shot in the dark : it is not sure why on macOS
some work is done on FileName objects that have a null Private pointer.
This move constructor is supposedly faster, and it pleases Coverity.
Stephan, could you please test it on macOS? This was the platform that
boke the previous version and lead to a reversion.
JMarc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-move-constructor-and-move-assignment-operator-fo.patch
Type: text/x-patch
Size: 3317 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20241004/c317f115/attachment.bin>
More information about the lyx-devel
mailing list