]> git.lyx.org Git - features.git/commit
Comply with rule-of-three
authorGeorg Baum <baum@lyx.org>
Sun, 11 Oct 2015 09:16:09 +0000 (11:16 +0200)
committerGeorg Baum <baum@lyx.org>
Sun, 11 Oct 2015 09:16:09 +0000 (11:16 +0200)
commitcea2d71e641e6a4023128a367d1cd5a593ed1706
treeab7512b9e461517f807b226e6d1f0480b4fa0f16
parent74be1664998ef5a947fec41846677e5ca1c06744
Comply with rule-of-three

The rule-of-three says that if any of virtual destructor, copy constructor
or assignment operator needs to be manually implemented, then all three
should be implemented. Otherwise you can get subtle bugs which can be
difficult to find. In the changed classes, changing a copy-construction to
an assignment would have had surprising effects. Now they all behave
consistently.
src/insets/InsetCommand.cpp
src/insets/InsetCommand.h
src/insets/InsetIPA.cpp
src/insets/InsetIPA.h
src/insets/InsetInclude.h
src/insets/InsetPreview.cpp
src/insets/InsetPreview.h