forked from qt-creator/qt-creator
Utils: Change SmallString::toView to SmallString::toStringView
This improves the readability of the code. Change-Id: Ifccbaaa6003636848ea48e00d92abc44f5c2e0f1 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -221,7 +221,7 @@ public:
|
|||||||
return QString::fromUtf8(data(), int(size()));
|
return QString::fromUtf8(data(), int(size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
SmallStringView toView() const
|
SmallStringView toStringView() const
|
||||||
{
|
{
|
||||||
return SmallStringView(data(), size());
|
return SmallStringView(data(), size());
|
||||||
}
|
}
|
||||||
|
@@ -1687,7 +1687,7 @@ TEST(SmallString, ToView)
|
|||||||
{
|
{
|
||||||
SmallString text = "text";
|
SmallString text = "text";
|
||||||
|
|
||||||
auto view = text.toView();
|
auto view = text.toStringView();
|
||||||
|
|
||||||
ASSERT_THAT(view, "text");
|
ASSERT_THAT(view, "text");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user