From cc5c899ce0953799a702bd0828e6c9260facf9e1 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Wed, 9 Jan 2019 18:32:26 +0100 Subject: [PATCH] Utils: Add default constructor to SmallStringView Change-Id: I3b45f19255cd61ac43807e21fdbf585c9243af26 Reviewed-by: Ivan Donchevskii --- src/libs/utils/smallstringview.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libs/utils/smallstringview.h b/src/libs/utils/smallstringview.h index 7881500ce68..d821edbf9b8 100644 --- a/src/libs/utils/smallstringview.h +++ b/src/libs/utils/smallstringview.h @@ -51,6 +51,8 @@ public: using const_reverse_iterator = std::reverse_iterator; using size_type = std::size_t; + constexpr SmallStringView() = default; + template constexpr SmallStringView(const char(&string)[Size]) noexcept @@ -179,8 +181,8 @@ public: } private: - const char *m_pointer; - size_type m_size; + const char *m_pointer = ""; + size_type m_size = 0; }; inline