From 2214421df51458660318946617e8a7c107ae2b60 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 29 Feb 2016 22:15:36 +0000 Subject: [PATCH] Use a StringView in notify_fatal_error --- src/assert.cc | 4 ++-- src/assert.hh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/assert.cc b/src/assert.cc index f2f341a0..157ed949 100644 --- a/src/assert.cc +++ b/src/assert.cc @@ -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) { diff --git a/src/assert.hh b/src/assert.hh index f178e1ad..16501e4c 100644 --- a/src/assert.hh +++ b/src/assert.hh @@ -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);