commit 90bceb65d30eaa7c240e3f0cd3d6cfcefbf48323 Author: Jean-Marc Lasgouttes <lasgout...@lyx.org> Date: Fri Jan 29 18:01:08 2021 +0100
Initialise correctly branch_list_id_ Reported by coverity. --- src/BranchList.cpp | 8 -------- src/BranchList.h | 12 ++++++------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/BranchList.cpp b/src/BranchList.cpp index b9024e5..db7b9a1 100644 --- a/src/BranchList.cpp +++ b/src/BranchList.cpp @@ -27,14 +27,6 @@ using namespace std; namespace lyx { -Branch::Branch() - : selected_(false), filenameSuffix_(false) -{ - lmcolor_ = "background"; - dmcolor_ = "background"; -} - - docstring const & Branch::branch() const { return branch_; diff --git a/src/BranchList.h b/src/BranchList.h index c221dc8..60e6b8d 100644 --- a/src/BranchList.h +++ b/src/BranchList.h @@ -43,7 +43,7 @@ namespace lyx { class Branch { public: /// - Branch(); + Branch() {} /// docstring const & branch() const; /// @@ -86,15 +86,15 @@ private: /// docstring branch_; /// - bool selected_; + bool selected_ = false; /// - bool filenameSuffix_; + bool filenameSuffix_ = false; /// light mode background color - std::string lmcolor_; + std::string lmcolor_ = "background"; /// dark mode background color - std::string dmcolor_; + std::string dmcolor_ = "background"; /// - int branch_list_id_; + int branch_list_id_ = 0; }; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs