commit 3dccdc5af50d93b86666a4208a7f6f16adfa23b3
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Mon Sep 21 13:45:49 2026 +0200

    Make overloaded methods virtual
    
    Spotted by cppcheck.
---
 src/insets/InsetCollapsible.h | 2 +-
 src/insets/InsetDynamicArgs.h | 2 +-
 src/mathed/InsetMath.h        | 2 +-
 src/mathed/InsetMathMacro.h   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/insets/InsetCollapsible.h b/src/insets/InsetCollapsible.h
index a485f81b94..d497e8494e 100644
--- a/src/insets/InsetCollapsible.h
+++ b/src/insets/InsetCollapsible.h
@@ -136,7 +136,7 @@ public:
        /// Returns the geometry based on CollapseStatus
        /// (status_), auto_open_[BufferView] and openinlined_,
        /// and of course decoration().
-       Geometry geometry(BufferView const & bv) const;
+       virtual Geometry geometry(BufferView const & bv) const;
        /// This closes insets that are auto_open_
        bool notifyCursorLeaves(Cursor const & old, Cursor & cur) override;
 
diff --git a/src/insets/InsetDynamicArgs.h b/src/insets/InsetDynamicArgs.h
index 8f6df0108e..bb99718087 100644
--- a/src/insets/InsetDynamicArgs.h
+++ b/src/insets/InsetDynamicArgs.h
@@ -31,7 +31,7 @@ public:
        ///
        void metrics(MetricsInfo &, Dimension &) const override;
        ///
-       Geometry geometry(BufferView const & bv) const;
+       Geometry geometry(BufferView const & bv) const override;
        ///
        bool canPaintChange(BufferView const & bv) const override;
        ///
diff --git a/src/mathed/InsetMath.h b/src/mathed/InsetMath.h
index 60a44065cc..7a15cf9564 100644
--- a/src/mathed/InsetMath.h
+++ b/src/mathed/InsetMath.h
@@ -214,7 +214,7 @@ public:
        virtual char_type getChar() const { return 0; }
 
        /// Whether the inset allows \(no)limits
-       bool allowsLimitsChange() const { return mathClass() == MC_OP; }
+       virtual bool allowsLimitsChange() const { return mathClass() == MC_OP; }
        /// The default limits value depending on whether display mode is on
        virtual Limits defaultLimits(bool /* display */) const { return 
NO_LIMITS; }
        /// whether the inset has limit-like sub/superscript
diff --git a/src/mathed/InsetMathMacro.h b/src/mathed/InsetMathMacro.h
index 956be94e98..b712b30530 100644
--- a/src/mathed/InsetMathMacro.h
+++ b/src/mathed/InsetMathMacro.h
@@ -41,7 +41,7 @@ public:
        bool addToMathRow(MathRow &, MetricsInfo & mi) const override;
 
        /// Whether the inset allows \(no)limits
-       bool allowsLimitsChange() const;
+       bool allowsLimitsChange() const override;
        /// The default limits value
        Limits defaultLimits(bool display) const override;
        /// whether the inset has limit-like sub/superscript
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to