From 175bcc6efce6644105c73eb93c0d532d5bb1e517 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 15 Mar 2023 23:36:41 +0100 Subject: [PATCH] Fixup 00c39208: initialise ParagraphMetrics::id_ in default constructor This was missing. Spotted by coverity. --- src/ParagraphMetrics.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ParagraphMetrics.h b/src/ParagraphMetrics.h index e0d9ce0541..0d186f158b 100644 --- a/src/ParagraphMetrics.h +++ b/src/ParagraphMetrics.h @@ -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 -- 2.39.5