[Libreoffice-bugs] [Bug 122605] New GCC 9 warning (-Wdeprecated-copy)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Mar 11 13:43:23 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=122605

--- Comment #4 from Martin Liška <mliska at suse.cz> ---
There's a patch candidate, can you please merge it:

diff --git a/examples/cppunittest/OrthodoxTest.h
b/examples/cppunittest/OrthodoxTest.h
index 8fc2a08..3781415 100644
--- a/examples/cppunittest/OrthodoxTest.h
+++ b/examples/cppunittest/OrthodoxTest.h
@@ -37,6 +36,7 @@ private:
   {
   public:
     Value( int value =0 ) : m_value( value ) {}
+    Value( const Value &other) : m_value ( other.m_value ) {}

     Value& operator= ( const Value& v )
     {
@@ -143,6 +143,12 @@ private:
     {
       return ValueBadCall( -1 - m_value );
     }
+
+    ValueBadCall &operator =( const ValueBadCall &other)
+    {
+      m_value = other.m_value;
+      return *this;
+    }
   };


@@ -150,6 +156,9 @@ private:
   {
   public:
     ValueBadAssignment( int value =0 ) : Value( value ) {}
+    ValueBadAssignment( const ValueBadAssignment &other): Value
(other.m_value)
+    {
+    }

     ValueBadAssignment operator !()
     {

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190311/f33f824e/attachment-0001.html>


More information about the Libreoffice-bugs mailing list