diff options
author | Brad King <brad.king@kitware.com> | 2022-05-18 12:43:24 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-05-18 12:43:31 (GMT) |
commit | 114acce9a18ecb1e547181d9ba9cdc8f4e71787b (patch) | |
tree | 00258baffd2550514b42ec27abc5b10b05bd24b6 /Source/CursesDialog/cmCursesMainForm.cxx | |
parent | aa2de7cd2a04699744a224ab84e0ca483559c5d3 (diff) | |
parent | 432a8ab7391c0cb3785561097283bba78ca985e5 (diff) | |
download | CMake-114acce9a18ecb1e547181d9ba9cdc8f4e71787b.zip CMake-114acce9a18ecb1e547181d9ba9cdc8f4e71787b.tar.gz CMake-114acce9a18ecb1e547181d9ba9cdc8f4e71787b.tar.bz2 |
Merge topic 'ccmake-fix-infinite-loop-search'
432a8ab739 ccmake: Fix infinite loop during invalid search
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7269
Diffstat (limited to 'Source/CursesDialog/cmCursesMainForm.cxx')
-rw-r--r-- | Source/CursesDialog/cmCursesMainForm.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 3e254e0..8381e86 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -95,9 +95,10 @@ void cmCursesMainForm::InitializeUI() // Add a label to display when cache is empty // dummy entry widget (does not respond to input) - cmCursesCacheEntryComposite comp("EMPTY CACHE", 30, 30); - comp.Entry = cm::make_unique<cmCursesDummyWidget>(1, 1, 1, 1); - newEntries.emplace_back(std::move(comp)); + this->EmptyCacheEntry = + cm::make_unique<cmCursesCacheEntryComposite>("EMPTY CACHE", 30, 30); + this->EmptyCacheEntry->Entry = + cm::make_unique<cmCursesDummyWidget>(1, 1, 1, 1); if (count > 0) { // Create the composites. @@ -192,10 +193,9 @@ void cmCursesMainForm::RePost() // if no cache entries there should still be one dummy field this->IsEmpty = this->Fields.empty(); if (this->IsEmpty) { - const auto& front = this->Entries.front(); - this->Fields.push_back(front.Label->Field); - this->Fields.push_back(front.IsNewLabel->Field); - this->Fields.push_back(front.Entry->Field); + this->Fields.push_back(this->EmptyCacheEntry->Label->Field); + this->Fields.push_back(this->EmptyCacheEntry->IsNewLabel->Field); + this->Fields.push_back(this->EmptyCacheEntry->Entry->Field); this->NumberOfVisibleEntries = 1; } // Has to be null terminated. |