From 690f9a7e74701e64db1035ccb11673942988d927 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sat, 10 Oct 2015 23:40:58 +0200 Subject: QtCore: use QStringRef in more places Apart from removing some unwanted allocations, also reduces text size by ~800B on Linux AMD64 GCC 4.9 release builds. Change-Id: Ibcd1d8264f54f2b165b69bee8aa50ff7f4ad3a10 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/corelib/io/qfilesystementry.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/corelib/io/qfilesystementry.cpp') diff --git a/src/corelib/io/qfilesystementry.cpp b/src/corelib/io/qfilesystementry.cpp index 79f16a0839..709970e3ac 100644 --- a/src/corelib/io/qfilesystementry.cpp +++ b/src/corelib/io/qfilesystementry.cpp @@ -53,8 +53,7 @@ static bool isUncRoot(const QString &server) if (idx == -1 || idx + 1 == localPath.length()) return true; - localPath = localPath.right(localPath.length() - idx - 1).trimmed(); - return localPath.isEmpty(); + return localPath.rightRef(localPath.length() - idx - 1).trimmed().isEmpty(); } static inline QString fixIfRelativeUncPath(const QString &path) -- cgit v1.2.3