diff options
author | Regina Pfeifer <regina@mailbox.org> | 2019-01-29 14:57:24 (GMT) |
---|---|---|
committer | Regina Pfeifer <regina@mailbox.org> | 2019-01-29 15:35:53 (GMT) |
commit | 8c92db829b41243790c7dcc5300227f591a727a8 (patch) | |
tree | af9791b3214748870159c8157e70efdf5400b4d7 /Source | |
parent | bcee24aecc1eaf6615eac9f24ae06acdf38845d3 (diff) | |
download | CMake-8c92db829b41243790c7dcc5300227f591a727a8.zip CMake-8c92db829b41243790c7dcc5300227f591a727a8.tar.gz CMake-8c92db829b41243790c7dcc5300227f591a727a8.tar.bz2 |
MessageCallback: Remove unused bool& argument
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/cmCTestBuildAndTestHandler.cxx | 2 | ||||
-rw-r--r-- | Source/CursesDialog/ccmake.cxx | 2 | ||||
-rw-r--r-- | Source/QtDialog/QCMake.cxx | 7 | ||||
-rw-r--r-- | Source/QtDialog/QCMake.h | 2 | ||||
-rw-r--r-- | Source/cmServer.cxx | 6 | ||||
-rw-r--r-- | Source/cmServer.h | 2 | ||||
-rw-r--r-- | Source/cmSystemTools.cxx | 2 | ||||
-rw-r--r-- | Source/cmSystemTools.h | 5 | ||||
-rw-r--r-- | Source/cmakemain.cxx | 23 |
9 files changed, 23 insertions, 28 deletions
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx index d6f0d18..38aa1b3 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.cxx +++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx @@ -118,7 +118,7 @@ public: : CM(cm) { cmSystemTools::SetMessageCallback( - [&s](const char* msg, const char* /*unused*/, bool& /*unused*/) { + [&s](const char* msg, const char* /*unused*/) { s += msg; s += "\n"; }); diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx index 82295b7..f2982a6 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, bool& /*unused*/) { + [myform](const char* message, const char* title) { myform->AddError(message, title); }); diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index 8c71cc0..065d610 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -25,8 +25,8 @@ QCMake::QCMake(QObject* p) cmSystemTools::SetRunCommandHideConsole(true); cmSystemTools::SetMessageCallback( - [this](const char* msg, const char* title, bool& cancel) { - this->messageCallback(msg, title, cancel); + [this](const char* msg, const char* title) { + this->messageCallback(msg, title); }); cmSystemTools::SetStdoutCallback( [this](const char* msg, size_t len) { this->stdoutCallback(msg, len); }); @@ -359,8 +359,7 @@ void QCMake::progressCallback(const char* msg, float percent) QCoreApplication::processEvents(); } -void QCMake::messageCallback(const char* msg, const char* /*title*/, - bool& /*stop*/) +void QCMake::messageCallback(const char* msg, const char* /*title*/) { emit this->errorMessage(QString::fromLocal8Bit(msg)); QCoreApplication::processEvents(); diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h index ad85630..4f22505 100644 --- a/Source/QtDialog/QCMake.h +++ b/Source/QtDialog/QCMake.h @@ -169,7 +169,7 @@ protected: bool interruptCallback(); void progressCallback(const char* msg, float percent); - void messageCallback(const char* msg, const char* title, bool&); + void messageCallback(const char* msg, const char* title); void stdoutCallback(const char* msg, size_t len); void stderrCallback(const char* msg, size_t len); diff --git a/Source/cmServer.cxx b/Source/cmServer.cxx index 44826fa..e740c05 100644 --- a/Source/cmServer.cxx +++ b/Source/cmServer.cxx @@ -97,8 +97,8 @@ void cmServer::ProcessRequest(cmConnection* connection, } cmSystemTools::SetMessageCallback( - [&request](const char* msg, const char* title, bool& cancel) { - reportMessage(msg, title, cancel, request); + [&request](const char* msg, const char* title) { + reportMessage(msg, title, request); }); if (this->Protocol) { @@ -166,7 +166,7 @@ void cmServer::reportProgress(const char* msg, float progress, } void cmServer::reportMessage(const char* msg, const char* title, - bool& /*cancel*/, const cmServerRequest& request) + const cmServerRequest& request) { assert(msg); std::string titleString; diff --git a/Source/cmServer.h b/Source/cmServer.h index 10588a0..bedf97f 100644 --- a/Source/cmServer.h +++ b/Source/cmServer.h @@ -120,7 +120,7 @@ public: private: static void reportProgress(const char* msg, float progress, const cmServerRequest& request); - static void reportMessage(const char* msg, const char* title, bool& cancel, + static void reportMessage(const char* msg, const char* title, const cmServerRequest& request); // Handle requests: diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index f660b39..7f00ba6 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -329,7 +329,7 @@ void cmSystemTools::Message(const char* m1, const char* title) return; } if (s_MessageCallback) { - s_MessageCallback(m1, title, s_DisableMessages); + s_MessageCallback(m1, title); return; } std::cerr << m1 << std::endl << std::flush; diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 754929d..bada4e3 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -56,12 +56,11 @@ public: */ static std::string TrimWhitespace(const std::string& s); - using MessageCallback = std::function<void(const char*, const char*, bool&)>; + using MessageCallback = std::function<void(const char*, const char*)>; /** * Set the function used by GUIs to display error messages * Function gets passed: message as a const char*, - * title as a const char*, and a reference to bool that when - * set to false, will disable further messages (cancel). + * title as a const char*. */ static void SetMessageCallback(MessageCallback f); diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index f1a223b..890b74e 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -143,7 +143,7 @@ static std::string cmakemainGetStack(cmake* cm) } static void cmakemainMessageCallback(const char* m, const char* /*unused*/, - bool& /*unused*/, cmake* cm) + cmake* cm) { std::cerr << m << cmakemainGetStack(cm) << std::endl << std::flush; } @@ -319,10 +319,9 @@ int do_cmake(int ac, char const* const* av) cmake cm(role, mode); cm.SetHomeDirectory(""); cm.SetHomeOutputDirectory(""); - cmSystemTools::SetMessageCallback( - [&cm](const char* msg, const char* title, bool& cancel) { - cmakemainMessageCallback(msg, title, cancel, &cm); - }); + cmSystemTools::SetMessageCallback([&cm](const char* msg, const char* title) { + cmakemainMessageCallback(msg, title, &cm); + }); cm.SetProgressCallback([&cm](const char* msg, float prog) { cmakemainProgressCallback(msg, prog, &cm); }); @@ -500,10 +499,9 @@ static int do_build(int ac, char const* const* av) } cmake cm(cmake::RoleInternal, cmState::Unknown); - cmSystemTools::SetMessageCallback( - [&cm](const char* msg, const char* title, bool& cancel) { - cmakemainMessageCallback(msg, title, cancel, &cm); - }); + cmSystemTools::SetMessageCallback([&cm](const char* msg, const char* title) { + cmakemainMessageCallback(msg, title, &cm); + }); cm.SetProgressCallback([&cm](const char* msg, float prog) { cmakemainProgressCallback(msg, prog, &cm); }); @@ -543,10 +541,9 @@ static int do_open(int ac, char const* const* av) } cmake cm(cmake::RoleInternal, cmState::Unknown); - cmSystemTools::SetMessageCallback( - [&cm](const char* msg, const char* title, bool& cancel) { - cmakemainMessageCallback(msg, title, cancel, &cm); - }); + cmSystemTools::SetMessageCallback([&cm](const char* msg, const char* title) { + cmakemainMessageCallback(msg, title, &cm); + }); cm.SetProgressCallback([&cm](const char* msg, float prog) { cmakemainProgressCallback(msg, prog, &cm); }); |