diff options
Diffstat (limited to 'Source/CursesDialog/cmCursesMainForm.cxx')
-rw-r--r-- | Source/CursesDialog/cmCursesMainForm.cxx | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 65376d1..df34283 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -161,7 +161,7 @@ void cmCursesMainForm::RePost() // If normal mode, count only non-advanced entries this->NumberOfVisibleEntries = 0; for (cmCursesCacheEntryComposite& entry : this->Entries) { - const char* existingValue = + cmProp existingValue = this->CMakeInstance->GetState()->GetCacheEntryValue(entry.GetValue()); bool advanced = this->CMakeInstance->GetState()->GetCacheEntryPropertyAsBool( @@ -182,7 +182,7 @@ void cmCursesMainForm::RePost() // Assign fields for (cmCursesCacheEntryComposite& entry : this->Entries) { - const char* existingValue = + cmProp existingValue = this->CMakeInstance->GetState()->GetCacheEntryValue(entry.GetValue()); bool advanced = this->CMakeInstance->GetState()->GetCacheEntryPropertyAsBool( @@ -241,7 +241,7 @@ void cmCursesMainForm::Render(int left, int top, int width, int height) // If normal, display only non-advanced entries this->NumberOfVisibleEntries = 0; for (cmCursesCacheEntryComposite& entry : this->Entries) { - const char* existingValue = + cmProp existingValue = this->CMakeInstance->GetState()->GetCacheEntryValue(entry.GetValue()); bool advanced = this->CMakeInstance->GetState()->GetCacheEntryPropertyAsBool( @@ -259,7 +259,7 @@ void cmCursesMainForm::Render(int left, int top, int width, int height) bool isNewPage; int i = 0; for (cmCursesCacheEntryComposite& entry : this->Entries) { - const char* existingValue = + cmProp existingValue = this->CMakeInstance->GetState()->GetCacheEntryValue(entry.GetValue()); bool advanced = this->CMakeInstance->GetState()->GetCacheEntryPropertyAsBool( @@ -405,11 +405,12 @@ void cmCursesMainForm::UpdateStatusBar(cm::optional<std::string> message) // Get the help string of the current entry // and add it to the help string auto cmakeState = this->CMakeInstance->GetState(); - const char* existingValue = cmakeState->GetCacheEntryValue(labelValue); + cmProp existingValue = cmakeState->GetCacheEntryValue(labelValue); if (existingValue) { - auto help = cmakeState->GetCacheEntryProperty(labelValue, "HELPSTRING"); + cmProp help = + cmakeState->GetCacheEntryProperty(labelValue, "HELPSTRING"); if (help) { - bar += help; + bar += *help; } } } @@ -616,10 +617,10 @@ void cmCursesMainForm::FillCacheManagerFromUI() { for (cmCursesCacheEntryComposite& entry : this->Entries) { const std::string& cacheKey = entry.Key; - const char* existingValue = + cmProp existingValue = this->CMakeInstance->GetState()->GetCacheEntryValue(cacheKey); if (existingValue) { - std::string oldValue = existingValue; + std::string oldValue = *existingValue; std::string newValue = entry.Entry->GetValue(); std::string fixedOldValue; std::string fixedNewValue; @@ -802,9 +803,9 @@ void cmCursesMainForm::HandleInput() cmCursesWidget* lbl = reinterpret_cast<cmCursesWidget*>( field_userptr(this->Fields[findex - 2])); const char* curField = lbl->GetValue(); - const char* helpString = nullptr; + cmProp helpString = nullptr; - const char* existingValue = + cmProp existingValue = this->CMakeInstance->GetState()->GetCacheEntryValue(curField); if (existingValue) { helpString = this->CMakeInstance->GetState()->GetCacheEntryProperty( @@ -813,7 +814,7 @@ void cmCursesMainForm::HandleInput() if (helpString) { this->HelpMessage[1] = cmStrCat("Current option is: ", curField, '\n', - "Help string for this option is: ", helpString, '\n'); + "Help string for this option is: ", *helpString, '\n'); } else { this->HelpMessage[1] = ""; } |