forked from qt-creator/qt-creator
Utils: Add default constructor to SmallStringView
Change-Id: I3b45f19255cd61ac43807e21fdbf585c9243af26 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -51,6 +51,8 @@ public:
|
|||||||
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
|
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
|
||||||
using size_type = std::size_t;
|
using size_type = std::size_t;
|
||||||
|
|
||||||
|
constexpr SmallStringView() = default;
|
||||||
|
|
||||||
template<size_type Size>
|
template<size_type Size>
|
||||||
constexpr
|
constexpr
|
||||||
SmallStringView(const char(&string)[Size]) noexcept
|
SmallStringView(const char(&string)[Size]) noexcept
|
||||||
@@ -179,8 +181,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const char *m_pointer;
|
const char *m_pointer = "";
|
||||||
size_type m_size;
|
size_type m_size = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline
|
inline
|
||||||
|
|||||||
Reference in New Issue
Block a user