summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CursesDialog/cmCursesCacheEntryComposite.cxx')
-rw-r--r--Source/CursesDialog/cmCursesCacheEntryComposite.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
index 249137f..682f95f 100644
--- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
+++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
@@ -19,9 +19,10 @@
#include "cmCursesDummyWidget.h"
#include "../cmSystemTools.h"
-cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(const char* key,
- int labelwidth,
- int entrywidth) :
+cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
+ const std::string& key,
+ int labelwidth,
+ int entrywidth) :
Key(key), LabelWidth(labelwidth), EntryWidth(entrywidth)
{
this->Label = new cmCursesLabelWidget(this->LabelWidth, 1, 1, 1, key);
@@ -31,7 +32,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(const char* key,
}
cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
- const char* key, const cmCacheManager::CacheIterator& it, bool isNew,
+ const std::string& key, const cmCacheManager::CacheIterator& it, bool isNew,
int labelwidth, int entrywidth)
: Key(key), LabelWidth(labelwidth), EntryWidth(entrywidth)
{
@@ -50,7 +51,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
{
case cmCacheManager::BOOL:
this->Entry = new cmCursesBoolWidget(this->EntryWidth, 1, 1, 1);
- if (cmSystemTools::IsOn(it.GetValue()))
+ if (cmSystemTools::IsOn(it.GetValue().c_str()))
{
static_cast<cmCursesBoolWidget*>(this->Entry)->SetValueAsBool(true);
}
@@ -93,7 +94,8 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
}
break;
case cmCacheManager::UNINITIALIZED:
- cmSystemTools::Error("Found an undefined variable: ", it.GetName());
+ cmSystemTools::Error("Found an undefined variable: ",
+ it.GetName().c_str());
break;
default:
// TODO : put warning message here