commit 1fb23f027a63c2175d7235a0344d6766e831b6b4
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Fri Jul 11 18:01:58 2025 +0200

    Implement rule of 0
    
    The destructors are not required. Fixes the following warnings:
    
      src/insets/InsetScript.h:56:2: warning: definition of implicit copy 
constructor for 'InsetScript' is deprecated because it has a user-provided 
destructor [-Wdeprecated-copy-with-user-provided-dtor]
      src/OutputParams.h:77:2: warning: definition of implicit copy constructor 
for 'OutputParams' is deprecated because it has a user-provided destructor 
[-Wdeprecated-copy-with-user-provided-dtor]
      src/support/ForkedCalls.h:43:10: warning: definition of implicit copy 
constructor for 'ForkedProcess' is deprecated because it has a user-provided 
destructor [-Wdeprecated-copy-with-user-provided-dtor]
      src/TextClass.h:83:10: warning: definition of implicit copy constructor 
for 'TextClass' is deprecated because it has a user-provided destructor 
[-Wdeprecated-copy-with-user-provided-dtor]
      src/xml.h:194:10: warning: definition of implicit copy constructor for 
'StartTag' is deprecated because it has a user-declared destructor 
[-Wdeprecated-copy-with-dtor]
      src/xml.h:226:10: warning: definition of implicit copy constructor for 
'EndTag' is deprecated because it has a user-declared destructor 
[-Wdeprecated-copy-with-dtor]
      src/xml.h:279:2: warning: definition of implicit copy constructor for 
'ParTag' is deprecated because it has a user-declared destructor 
[-Wdeprecated-copy-with-dtor]
---
 src/OutputParams.cpp       | 4 ----
 src/OutputParams.h         | 1 -
 src/TextClass.h            | 2 --
 src/insets/InsetScript.cpp | 5 -----
 src/insets/InsetScript.h   | 2 --
 src/support/ForkedCalls.h  | 2 --
 src/xml.h                  | 8 --------
 7 files changed, 24 deletions(-)

diff --git a/src/OutputParams.cpp b/src/OutputParams.cpp
index 7c22cb1348..807fa84bcb 100644
--- a/src/OutputParams.cpp
+++ b/src/OutputParams.cpp
@@ -30,10 +30,6 @@ OutputParams::OutputParams(Encoding const * enc)
 }
 
 
-OutputParams::~OutputParams()
-{}
-
-
 bool OutputParams::isLaTeX() const
 {
        return flavor == Flavor::LaTeX
diff --git a/src/OutputParams.h b/src/OutputParams.h
index 47798a3456..f6d1830dc1 100644
--- a/src/OutputParams.h
+++ b/src/OutputParams.h
@@ -74,7 +74,6 @@ public:
        };
 
        OutputParams(Encoding const *);
-       ~OutputParams();
 
        /** The file that we export depends occasionally on what is to
            compile the file.
diff --git a/src/TextClass.h b/src/TextClass.h
index ad2f4ee0ea..8ff1f23c58 100644
--- a/src/TextClass.h
+++ b/src/TextClass.h
@@ -79,8 +79,6 @@ private:
 ///
 class TextClass : protected ProtectCopy {
 public:
-       ///
-       virtual ~TextClass() {}
        ///////////////////////////////////////////////////////////////////
        // typedefs
        ///////////////////////////////////////////////////////////////////
diff --git a/src/insets/InsetScript.cpp b/src/insets/InsetScript.cpp
index 8122c2c394..f1e0e07beb 100644
--- a/src/insets/InsetScript.cpp
+++ b/src/insets/InsetScript.cpp
@@ -135,11 +135,6 @@ InsetScript::InsetScript(Buffer * buf, string const & 
label)
 }
 
 
-InsetScript::~InsetScript()
-{
-}
-
-
 docstring InsetScript::layoutName() const
 {
        return from_ascii("Script:" + scripttranslator().find(params_.type));
diff --git a/src/insets/InsetScript.h b/src/insets/InsetScript.h
index eab074b1e2..e97e519990 100644
--- a/src/insets/InsetScript.h
+++ b/src/insets/InsetScript.h
@@ -53,8 +53,6 @@ public:
        ///
        InsetScript(Buffer *, std::string const &);
        ///
-       ~InsetScript();
-       ///
        static std::string params2string(InsetScriptParams const &);
        ///
        static void string2params(std::string const &, InsetScriptParams &);
diff --git a/src/support/ForkedCalls.h b/src/support/ForkedCalls.h
index 734f193b87..ac7b45e08d 100644
--- a/src/support/ForkedCalls.h
+++ b/src/support/ForkedCalls.h
@@ -40,8 +40,6 @@ public:
        ///
        ForkedProcess();
        ///
-       virtual ~ForkedProcess() {}
-       ///
        virtual std::shared_ptr<ForkedProcess> clone() const = 0;
 
        /** A Signal signal can be emitted once the forked process
diff --git a/src/xml.h b/src/xml.h
index b7133f69fa..e6b4b43705 100644
--- a/src/xml.h
+++ b/src/xml.h
@@ -190,8 +190,6 @@ struct StartTag
        explicit StartTag(std::string const & tag, docstring const & attr,
                                          bool keepempty = false, std::string 
const & tagtype = "none")
                        : tag_(from_ascii(tag)), attr_(attr), 
keepempty_(keepempty), tagtype_(tagtype) {}
-       ///
-       virtual ~StartTag() = default;
        /// <tag_ attr_>
        virtual docstring writeTag() const;
        /// </tag_>
@@ -222,8 +220,6 @@ struct EndTag
        /// Create an EndTag corresponding to the given StartTag.
        explicit EndTag(StartTag const & start_tag)
                : tag_(start_tag.tag_), tagtype_(start_tag.tagtype_) {}
-       ///
-       virtual ~EndTag() = default;
        /// </tag_>
        virtual docstring writeEndTag() const;
        ///
@@ -275,8 +271,6 @@ struct ParTag : public StartTag
 {
        ///
        explicit ParTag(std::string const & tag, const std::string & attr): 
StartTag(tag, from_utf8(attr)) {}
-       ///
-       ~ParTag() override = default;
 };
 
 
@@ -285,8 +279,6 @@ struct NullTag : public StartTag
 {
        ///
        NullTag(): StartTag("NULLTAG", from_utf8(""), true) {}
-       ///
-       ~NullTag() override = default;
 };
 
 
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to