From fb39e46d3d34bda164eeabdf05daeb6f6e5da6fe Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 5 Sep 2019 19:06:39 +0200 Subject: [PATCH] Utf8View: Try fixing the travis-ci build There's some overload ambiguity when doing Utf8View("literal") --- AK/Utf8View.cpp | 5 +++++ AK/Utf8View.h | 1 + 2 files changed, 6 insertions(+) diff --git a/AK/Utf8View.cpp b/AK/Utf8View.cpp index ad54c164edd..9e15f4c7217 100644 --- a/AK/Utf8View.cpp +++ b/AK/Utf8View.cpp @@ -13,6 +13,11 @@ Utf8View::Utf8View(const StringView& string) { } +Utf8View::Utf8View(const char* string) + : m_string(string) +{ +} + const unsigned char* Utf8View::begin_ptr() const { return (const unsigned char*)m_string.characters_without_null_termination(); diff --git a/AK/Utf8View.h b/AK/Utf8View.h index 73727af3f2c..5db0e1b7ea3 100644 --- a/AK/Utf8View.h +++ b/AK/Utf8View.h @@ -28,6 +28,7 @@ class Utf8View { public: explicit Utf8View(const String&); explicit Utf8View(const StringView&); + explicit Utf8View(const char*); ~Utf8View() {} const StringView& as_string() const { return m_string; }