commit 2f0ad3a7868d17ed23a4e75ed006eeae7d58de15
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Fri Jul 11 15:29:45 2025 +0200

    Implement rule of 3
    
    Since a destructor is reuired here, declare explicitly assignment copy
    operator and copy constructor as default.
    
    Fixes warnings:
    
      src/insets/InsetBibitem.h:37:2: warning: definition of implicit copy 
constructor for 'InsetBibitem' is deprecated because it has a user-provided 
destructor [-Wdeprecated-copy-with-user-provided-dtor]
      src/insets/InsetCitation.h:36:2: warning: definition of implicit copy 
constructor for 'InsetCitation' is deprecated because it has a user-provided 
destructor [-Wdeprecated-copy-with-user-provided-dtor]
---
 src/insets/InsetBibitem.h  | 4 ++++
 src/insets/InsetCitation.h | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/src/insets/InsetBibitem.h b/src/insets/InsetBibitem.h
index b9ce1aef81..eb0a939af9 100644
--- a/src/insets/InsetBibitem.h
+++ b/src/insets/InsetBibitem.h
@@ -34,7 +34,11 @@ public:
        ///
        InsetBibitem(Buffer *, InsetCommandParams const &);
        ///
+       InsetBibitem(InsetBibitem const &) = default;
+       ///
        ~InsetBibitem();
+       ///
+       InsetBibitem & operator=(InsetBibitem const &) = default;
 
        ///
        void updateCommand(docstring const & new_key, bool dummy = false);
diff --git a/src/insets/InsetCitation.h b/src/insets/InsetCitation.h
index 30e78013dc..286ee49cef 100644
--- a/src/insets/InsetCitation.h
+++ b/src/insets/InsetCitation.h
@@ -33,7 +33,11 @@ public:
        ///
        InsetCitation(Buffer * buf, InsetCommandParams const &);
        ///
+       InsetCitation(InsetCitation const &) = default;
+       ///
        ~InsetCitation();
+       ///
+       InsetCitation & operator=(InsetCitation const &) = default;
 
        ///
        bool addKey(std::string const & key);
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to