diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-04-18 14:20:40 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-04-18 15:35:04 +0200 |
commit | 17d71dda6779bbfc4c65b9cd4220b5d7e4a72a12 (patch) | |
tree | 8e98525ebd2ece05acb132962e759de779a79f6b | |
parent | ff45af0ed5ce1ffa1617307f27cef4b340f37445 (diff) |
libshiboken: Remove unnecessary std::string usage
Amends 7accf7c3042e3f0680fa0615a0f13b54d28a0efd.
Pick-to: 6.7
Task-number: PYSIDE-2404
Change-Id: I80db321cb770ba2496e24520970ed519925ecffc
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
-rw-r--r-- | sources/shiboken6/libshiboken/sbkmodule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken6/libshiboken/sbkmodule.cpp b/sources/shiboken6/libshiboken/sbkmodule.cpp index b705e8380..4153df27f 100644 --- a/sources/shiboken6/libshiboken/sbkmodule.cpp +++ b/sources/shiboken6/libshiboken/sbkmodule.cpp @@ -50,7 +50,7 @@ LIBSHIBOKEN_API PyTypeObject *get(TypeInitStruct &typeStruct) // As soon as types[index] gets filled, we can stop. std::string_view names(typeStruct.fullName); - bool usePySide = names.substr(0, 8) == std::string("PySide6."); + const bool usePySide = names.compare(0, 8, "PySide6.") == 0; auto dotPos = usePySide ? names.find('.', 8) : names.find('.'); auto startPos = dotPos + 1; AutoDecRef modName(String::fromCppStringView(names.substr(0, dotPos))); |