Use a StringView in notify_fatal_error

This commit is contained in:
Maxime Coste 2016-02-29 22:15:36 +00:00
parent 92b56cbda0
commit 2214421df5
2 changed files with 4 additions and 4 deletions

View File

@ -25,10 +25,10 @@ private:
String m_message;
};
bool notify_fatal_error(const String& msg)
bool notify_fatal_error(StringView msg)
{
#if defined(__CYGWIN__)
int res = MessageBox(NULL, msg.c_str(), "Kakoune: fatal error",
int res = MessageBox(NULL, msg.zstr(), "Kakoune: fatal error",
MB_OKCANCEL | MB_ICONERROR);
switch (res)
{

View File

@ -4,10 +4,10 @@
namespace Kakoune
{
class String;
class StringView;
// return true if user asked to ignore the error
bool notify_fatal_error(const String& message);
bool notify_fatal_error(StringView message);
void on_assert_failed(const char* message);