diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-10-10 23:40:58 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-10-12 09:34:03 +0000 |
commit | 690f9a7e74701e64db1035ccb11673942988d927 (patch) | |
tree | 031ecd5570f9b8e3051bb11531c2511167c861cc /src/corelib/io/qfilesystementry.cpp | |
parent | 2a1ea8f13be95f664b112663986102300a17bdfe (diff) |
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) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/io/qfilesystementry.cpp')
-rw-r--r-- | src/corelib/io/qfilesystementry.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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) |