]> git.lyx.org Git - lyx.git/commitdiff
Prevent accidental usage of wrong copy constructor
authorGeorg Baum <baum@lyx.org>
Tue, 11 Nov 2014 06:22:14 +0000 (07:22 +0100)
committerGeorg Baum <baum@lyx.org>
Tue, 11 Nov 2014 19:57:25 +0000 (20:57 +0100)
src/Paragraph.cpp

index 103428a2d5dbdc006684cc4ca7dd76098dbb11ee..37e26a8b86683d125124c218e3e586cbefd4e07b 100644 (file)
@@ -282,6 +282,10 @@ private:
 
 class Paragraph::Private
 {
+       // Enforce our own "copy" constructor by declaring the standard one and
+       // the assignment operator private without implementing them.
+       Private(Private const &);
+       Private & operator=(Private const &);
 public:
        ///
        Private(Paragraph * owner, Layout const & layout);