commit 797bb3b742d9366cf2ae0ea5a85274cd847c26a8
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Thu Jul 3 00:04:15 2025 +0200

    Declare the two versions of asSubstackInset()
    
    This is the right thing to do, since there are a normal and a const
    version in Inset.
    
    This avoids the following warning:
    src/mathed/InsetMath.h:189:43: warning: ‘virtual lyx::InsetMathSubstack* 
lyx::InsetMath::asSubstackInset()’ was hidden [-Woverloaded-virtual=]
      189 |         virtual InsetMathSubstack       * asSubstackInset()       { 
return nullptr; }
          |                                           ^~~~~~~~~~~~~~~
    src/mathed/InsetMathSubstack.h:32:35: note:   by ‘virtual const 
lyx::InsetMathSubstack* lyx::InsetMathSubstack::asSubstackInset() const’
       32 |         InsetMathSubstack const * asSubstackInset() const override 
{ return this; }
          |                                   ^~~~~~~~~~~~~~~
    
    Spotted by Scott and his evil compiler options.
---
 src/mathed/InsetMathSubstack.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mathed/InsetMathSubstack.h b/src/mathed/InsetMathSubstack.h
index 784e3f3d54..b6b2dfad64 100644
--- a/src/mathed/InsetMathSubstack.h
+++ b/src/mathed/InsetMathSubstack.h
@@ -29,6 +29,8 @@ public:
        ///
        void draw(PainterInfo & pi, int x, int y) const override;
        ///
+       InsetMathSubstack * asSubstackInset() override { return this; }
+       ///
        InsetMathSubstack const * asSubstackInset() const override { return 
this; }
 
        ///
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to