]> git.lyx.org Git - features.git/commitdiff
Fixup 00c39208: initialise ParagraphMetrics::id_ in default constructor
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 15 Mar 2023 22:36:41 +0000 (23:36 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 15 Mar 2023 22:38:16 +0000 (23:38 +0100)
This was missing. Spotted by coverity.

src/ParagraphMetrics.h

index e0d9ce054144893b64477ef1b88db42778050811..0d186f158bc217917d0d563d47a7592871892061 100644 (file)
@@ -29,7 +29,7 @@ class Paragraph;
 class ParagraphMetrics {
 public:
        /// Default constructor (only here for STL containers).
-       ParagraphMetrics() : position_(0), par_(0) {}
+       ParagraphMetrics() {}
        /// The only useful constructor.
        explicit ParagraphMetrics(Paragraph const & par);
 
@@ -77,15 +77,15 @@ public:
 
 private:
        ///
-       int position_;
+       int position_ = 0;
        ///
-       int id_;
+       int id_ = -1;
        ///
        mutable RowList rows_;
        /// cached dimensions of paragraph
        Dimension dim_;
        ///
-       Paragraph const * par_;
+       Paragraph const * par_ = nullptr;
 };
 
 } // namespace lyx