Use a StringView in notify_fatal_error
This commit is contained in:
parent
92b56cbda0
commit
2214421df5
|
@ -25,10 +25,10 @@ private:
|
||||||
String m_message;
|
String m_message;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool notify_fatal_error(const String& msg)
|
bool notify_fatal_error(StringView msg)
|
||||||
{
|
{
|
||||||
#if defined(__CYGWIN__)
|
#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);
|
MB_OKCANCEL | MB_ICONERROR);
|
||||||
switch (res)
|
switch (res)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
namespace Kakoune
|
namespace Kakoune
|
||||||
{
|
{
|
||||||
|
|
||||||
class String;
|
class StringView;
|
||||||
|
|
||||||
// return true if user asked to ignore the error
|
// 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);
|
void on_assert_failed(const char* message);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user