From 7e55f08343ef888dbdcd7a521f437102f95681ab Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Mon, 11 Mar 2019 23:37:25 +0100 Subject: Remove reference from const KConfigIniBackend::BufferFragment & Summary: According to clazy since KConfigIniBackend::BufferFragment is very small it's faster to just copy it Reviewers: apol Reviewed By: apol Subscribers: apol, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D19666 --- src/core/bufferfragment_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/bufferfragment_p.h') diff --git a/src/core/bufferfragment_p.h b/src/core/bufferfragment_p.h index bbc09a2b..b4aff92a 100644 --- a/src/core/bufferfragment_p.h +++ b/src/core/bufferfragment_p.h @@ -150,7 +150,7 @@ public: return (other.size() != (int)len || memcmp(d, other.constData(), len) != 0); } - bool operator==(const BufferFragment &other) const + bool operator==(const BufferFragment other) const { return other.len == len && !memcmp(d, other.d, len); } @@ -195,7 +195,7 @@ private: unsigned int len; }; -uint qHash(const KConfigIniBackend::BufferFragment &fragment) +uint qHash(const KConfigIniBackend::BufferFragment fragment) { const uchar *p = reinterpret_cast(fragment.constData()); const int len = fragment.length(); -- cgit v1.2.1