summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-02-22 00:05:55 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-08 18:05:37 (GMT)
commitb3bf31a5488a19ea3c357e346b882a2ca84c63b6 (patch)
tree42cb81b5ec3c7888ef4f75e68f767f3992c4ec4f /Source/CursesDialog
parent5af95c396dc780c04444f549b957c2cba7c75309 (diff)
downloadCMake-b3bf31a5488a19ea3c357e346b882a2ca84c63b6.zip
CMake-b3bf31a5488a19ea3c357e346b882a2ca84c63b6.tar.gz
CMake-b3bf31a5488a19ea3c357e346b882a2ca84c63b6.tar.bz2
stringapi: Miscellaneous char* parameters
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r--Source/CursesDialog/cmCursesOptionsWidget.cxx2
-rw-r--r--Source/CursesDialog/cmCursesOptionsWidget.h2
-rw-r--r--Source/CursesDialog/cmCursesStringWidget.cxx2
-rw-r--r--Source/CursesDialog/cmCursesStringWidget.h2
-rw-r--r--Source/CursesDialog/cmCursesWidget.cxx4
-rw-r--r--Source/CursesDialog/cmCursesWidget.h2
6 files changed, 7 insertions, 7 deletions
diff --git a/Source/CursesDialog/cmCursesOptionsWidget.cxx b/Source/CursesDialog/cmCursesOptionsWidget.cxx
index 652b2df..aa680fb 100644
--- a/Source/CursesDialog/cmCursesOptionsWidget.cxx
+++ b/Source/CursesDialog/cmCursesOptionsWidget.cxx
@@ -89,7 +89,7 @@ void cmCursesOptionsWidget::PreviousOption()
this->SetValue(this->Options[this->CurrentOption].c_str());
}
-void cmCursesOptionsWidget::SetOption(const char* value)
+void cmCursesOptionsWidget::SetOption(const std::string& value)
{
this->CurrentOption = 0; // default to 0 index
this->SetValue(value);
diff --git a/Source/CursesDialog/cmCursesOptionsWidget.h b/Source/CursesDialog/cmCursesOptionsWidget.h
index b52ac9d..5cee489 100644
--- a/Source/CursesDialog/cmCursesOptionsWidget.h
+++ b/Source/CursesDialog/cmCursesOptionsWidget.h
@@ -25,7 +25,7 @@ public:
// when this widget has focus. Returns true if the input was
// handled.
virtual bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w);
- void SetOption(const char*);
+ void SetOption(const std::string&);
void AddOption(std::string const &);
void NextOption();
void PreviousOption();
diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx
index bd1ff71..d25022d 100644
--- a/Source/CursesDialog/cmCursesStringWidget.cxx
+++ b/Source/CursesDialog/cmCursesStringWidget.cxx
@@ -195,7 +195,7 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm,
return true;
}
-void cmCursesStringWidget::SetString(const char* value)
+void cmCursesStringWidget::SetString(const std::string& value)
{
this->SetValue(value);
}
diff --git a/Source/CursesDialog/cmCursesStringWidget.h b/Source/CursesDialog/cmCursesStringWidget.h
index e939049..dd8c02a 100644
--- a/Source/CursesDialog/cmCursesStringWidget.h
+++ b/Source/CursesDialog/cmCursesStringWidget.h
@@ -37,7 +37,7 @@ public:
/**
* Set/Get the string.
*/
- void SetString(const char* value);
+ void SetString(const std::string& value);
const char* GetString();
virtual const char* GetValue();
diff --git a/Source/CursesDialog/cmCursesWidget.cxx b/Source/CursesDialog/cmCursesWidget.cxx
index 5dffcaa..e5363f4 100644
--- a/Source/CursesDialog/cmCursesWidget.cxx
+++ b/Source/CursesDialog/cmCursesWidget.cxx
@@ -46,10 +46,10 @@ void cmCursesWidget::Move(int x, int y, bool isNewPage)
}
}
-void cmCursesWidget::SetValue(const char* value)
+void cmCursesWidget::SetValue(const std::string& value)
{
this->Value = value;
- set_field_buffer(this->Field, 0, value);
+ set_field_buffer(this->Field, 0, value.c_str());
}
const char* cmCursesWidget::GetValue()
diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h
index 952c67a..d91a0cb 100644
--- a/Source/CursesDialog/cmCursesWidget.h
+++ b/Source/CursesDialog/cmCursesWidget.h
@@ -40,7 +40,7 @@ public:
* Set/Get the value (setting the value also changes the contents
* of the field buffer).
*/
- virtual void SetValue(const char* value);
+ virtual void SetValue(const std::string& value);
virtual const char* GetValue();
/**