mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 11:50:11 -05:00
Merge topic 'message-stdstring'
82edd98300 cmSystemTools: MessageCallback and Message() accept std::string argument
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2929
This commit is contained in:
@@ -56,7 +56,7 @@ public:
|
||||
*/
|
||||
static std::string TrimWhitespace(const std::string& s);
|
||||
|
||||
using MessageCallback = std::function<void(const char*, const char*)>;
|
||||
using MessageCallback = std::function<void(const std::string&, const char*)>;
|
||||
/**
|
||||
* Set the function used by GUIs to display error messages
|
||||
* Function gets passed: message as a const char*,
|
||||
@@ -74,11 +74,7 @@ public:
|
||||
/**
|
||||
* Display a message.
|
||||
*/
|
||||
static void Message(const char* m, const char* title = nullptr);
|
||||
static void Message(const std::string& m, const char* title = nullptr)
|
||||
{
|
||||
Message(m.c_str(), title);
|
||||
}
|
||||
static void Message(const std::string& m, const char* title = nullptr);
|
||||
|
||||
using OutputCallback = std::function<void(std::string const&)>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user