From a572b2db6adac94bd0c85882baccf0a8353aafef Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Wed, 17 Jan 2018 11:52:18 +0100 Subject: [PATCH] Utils: Change SmallString::toView to SmallString::toStringView This improves the readability of the code. Change-Id: Ifccbaaa6003636848ea48e00d92abc44f5c2e0f1 Reviewed-by: Ivan Donchevskii --- src/libs/utils/smallstring.h | 2 +- tests/unit/unittest/smallstring-test.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/utils/smallstring.h b/src/libs/utils/smallstring.h index 9fd488b80e8..f7bc78f3040 100644 --- a/src/libs/utils/smallstring.h +++ b/src/libs/utils/smallstring.h @@ -221,7 +221,7 @@ public: return QString::fromUtf8(data(), int(size())); } - SmallStringView toView() const + SmallStringView toStringView() const { return SmallStringView(data(), size()); } diff --git a/tests/unit/unittest/smallstring-test.cpp b/tests/unit/unittest/smallstring-test.cpp index 69017f0d70d..f64c608696c 100644 --- a/tests/unit/unittest/smallstring-test.cpp +++ b/tests/unit/unittest/smallstring-test.cpp @@ -1687,7 +1687,7 @@ TEST(SmallString, ToView) { SmallString text = "text"; - auto view = text.toView(); + auto view = text.toStringView(); ASSERT_THAT(view, "text");