From e1c85e29f4a09b45fa3cb29e4f225e68c32d9932 Mon Sep 17 00:00:00 2001 From: Martin Duffy Date: Thu, 12 May 2022 16:40:58 -0400 Subject: ccmake: Move Initialization of Fields Inline Move initialization of simple fields in cmCursesMainForm inline. --- Source/CursesDialog/cmCursesMainForm.cxx | 6 ------ Source/CursesDialog/cmCursesMainForm.h | 12 ++++++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 11b3b35..cd0a4bd 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -35,11 +35,6 @@ cmCursesMainForm::cmCursesMainForm(std::vector args, : Args(std::move(args)) , InitialWidth(initWidth) { - this->HasNonStatusOutputs = false; - this->NumberOfPages = 0; - this->AdvancedMode = false; - this->NumberOfVisibleEntries = 0; - this->OkToGenerate = false; this->HelpMessage.emplace_back( "Welcome to ccmake, curses based user interface for CMake."); this->HelpMessage.emplace_back(); @@ -54,7 +49,6 @@ cmCursesMainForm::cmCursesMainForm(std::vector args, cmStrCat(cmSystemTools::GetProgramPath(this->Args[0]), "/cmake"); this->Args[0] = whereCMake; this->CMakeInstance->SetArgs(this->Args); - this->SearchMode = false; } cmCursesMainForm::~cmCursesMainForm() diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h index c6db66f..9eb6418 100644 --- a/Source/CursesDialog/cmCursesMainForm.h +++ b/Source/CursesDialog/cmCursesMainForm.h @@ -138,7 +138,7 @@ protected: // Output produced by the last pass std::vector Outputs; // Did the last pass produced outputs of interest (errors, warnings, ...) - bool HasNonStatusOutputs; + bool HasNonStatusOutputs = false; // Last progress bar std::string LastProgress; @@ -155,17 +155,17 @@ protected: // Fields displayed. Includes labels, new entry markers, entries std::vector Fields; // Number of entries shown (depends on mode -normal or advanced-) - size_t NumberOfVisibleEntries; - bool AdvancedMode; + size_t NumberOfVisibleEntries = 0; + bool AdvancedMode = false; // Did the iteration converge (no new entries) ? - bool OkToGenerate; + bool OkToGenerate = false; // Number of pages displayed - int NumberOfPages; + int NumberOfPages = 0; int InitialWidth; std::unique_ptr CMakeInstance; std::string SearchString; std::string OldSearchString; - bool SearchMode; + bool SearchMode = false; }; -- cgit v0.12