summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2019-02-06 20:00:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2019-02-07 18:41:27 (GMT)
commit82edd98300b9d050dd28fdfa1e6ea7b18ecca22c (patch)
treea0bd32bc16a5793f9729cfb82872e4df8f47ad78 /Source/CursesDialog
parent062cfd991faac000d484c74e5af7d65726c655dc (diff)
downloadCMake-82edd98300b9d050dd28fdfa1e6ea7b18ecca22c.zip
CMake-82edd98300b9d050dd28fdfa1e6ea7b18ecca22c.tar.gz
CMake-82edd98300b9d050dd28fdfa1e6ea7b18ecca22c.tar.bz2
cmSystemTools: MessageCallback and Message() accept std::string argument
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r--Source/CursesDialog/ccmake.cxx2
-rw-r--r--Source/CursesDialog/cmCursesForm.h4
-rw-r--r--Source/CursesDialog/cmCursesMainForm.cxx3
-rw-r--r--Source/CursesDialog/cmCursesMainForm.h2
4 files changed, 7 insertions, 4 deletions
diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx
index f2982a6..745c6bb 100644
--- a/Source/CursesDialog/ccmake.cxx
+++ b/Source/CursesDialog/ccmake.cxx
@@ -150,7 +150,7 @@ int main(int argc, char const* const* argv)
}
cmSystemTools::SetMessageCallback(
- [myform](const char* message, const char* title) {
+ [myform](const std::string& message, const char* title) {
myform->AddError(message, title);
});
diff --git a/Source/CursesDialog/cmCursesForm.h b/Source/CursesDialog/cmCursesForm.h
index ddb67de..7842905 100644
--- a/Source/CursesDialog/cmCursesForm.h
+++ b/Source/CursesDialog/cmCursesForm.h
@@ -9,6 +9,8 @@
#include "cmsys/FStream.hxx"
+#include <string>
+
class cmCursesForm
{
public:
@@ -34,7 +36,7 @@ public:
// Description:
// During a CMake run, an error handle should add errors
// to be displayed afterwards.
- virtual void AddError(const char*, const char*) {}
+ virtual void AddError(const std::string&, const char*) {}
// Description:
// Turn debugging on. This will create ccmakelog.txt.
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx
index 8ca7802..f6a1a57 100644
--- a/Source/CursesDialog/cmCursesMainForm.cxx
+++ b/Source/CursesDialog/cmCursesMainForm.cxx
@@ -647,7 +647,8 @@ int cmCursesMainForm::Generate()
return 0;
}
-void cmCursesMainForm::AddError(const char* message, const char* /*unused*/)
+void cmCursesMainForm::AddError(const std::string& message,
+ const char* /*unused*/)
{
this->Errors.emplace_back(message);
}
diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h
index cc6482f..c09ce2a 100644
--- a/Source/CursesDialog/cmCursesMainForm.h
+++ b/Source/CursesDialog/cmCursesMainForm.h
@@ -81,7 +81,7 @@ public:
* During a CMake run, an error handle should add errors
* to be displayed afterwards.
*/
- void AddError(const char* message, const char* title) override;
+ void AddError(const std::string& message, const char* title) override;
/**
* Used to do a configure. If argument is specified, it does only the check