diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2020-03-20 12:38:09 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2020-03-23 12:09:09 +0200 |
commit | d15b9c1f9c1afa29175ba2e398adc680e66147e6 (patch) | |
tree | 6bf426ae77d7386a6bbdee30444974bbc5dd76d0 /platform/android | |
parent | 37802eec36aae3cb84c7f73a48652d9959489243 (diff) | |
download | qtlocation-mapboxgl-d15b9c1f9c1afa29175ba2e398adc680e66147e6.tar.gz |
[core] Fix performance-unnecessary-value-param errors
As reported by clang-tidy-8.
Diffstat (limited to 'platform/android')
-rw-r--r-- | platform/android/src/i18n/collator.cpp | 6 | ||||
-rw-r--r-- | platform/android/src/offline/offline_region.cpp | 2 | ||||
-rw-r--r-- | platform/android/src/test/collator_test_stub.cpp | 2 | ||||
-rw-r--r-- | platform/android/src/text/local_glyph_rasterizer.cpp | 5 |
4 files changed, 6 insertions, 9 deletions
diff --git a/platform/android/src/i18n/collator.cpp b/platform/android/src/i18n/collator.cpp index b3dd8e21b3..9136ee7b7c 100644 --- a/platform/android/src/i18n/collator.cpp +++ b/platform/android/src/i18n/collator.cpp @@ -173,10 +173,8 @@ private: jni::Global<jni::Object<android::Locale>> locale; }; - -Collator::Collator(bool caseSensitive, bool diacriticSensitive, optional<std::string> locale_) - : impl(std::make_shared<Impl>(caseSensitive, diacriticSensitive, std::move(locale_))) -{} +Collator::Collator(bool caseSensitive, bool diacriticSensitive, const optional<std::string>& locale_) + : impl(std::make_shared<Impl>(caseSensitive, diacriticSensitive, locale_)) {} bool Collator::operator==(const Collator& other) const { return *impl == *(other.impl); diff --git a/platform/android/src/offline/offline_region.cpp b/platform/android/src/offline/offline_region.cpp index de7abef624..b1cdc56f79 100644 --- a/platform/android/src/offline/offline_region.cpp +++ b/platform/android/src/offline/offline_region.cpp @@ -111,7 +111,7 @@ void OfflineRegion::getOfflineRegionStatus(jni::JNIEnv& env_, const jni::Object< void OfflineRegion::deleteOfflineRegion(jni::JNIEnv& env_, const jni::Object<OfflineRegionDeleteCallback>& callback_) { auto globalCallback = jni::NewGlobal<jni::EnvAttachingDeleter>(env_, callback_); - fileSource->deleteOfflineRegion(std::move(*region), + fileSource->deleteOfflineRegion(*region, [ // Ensure the object is not gc'd in the meanwhile callback = std::make_shared<decltype(globalCallback)>( diff --git a/platform/android/src/test/collator_test_stub.cpp b/platform/android/src/test/collator_test_stub.cpp index 7c83318979..0d7c6c95be 100644 --- a/platform/android/src/test/collator_test_stub.cpp +++ b/platform/android/src/test/collator_test_stub.cpp @@ -16,7 +16,7 @@ public: std::string resolvedLocale() const { return ""; } }; -Collator::Collator(bool, bool, optional<std::string> locale_) : impl(std::make_shared<Impl>(std::move(locale_))) {} +Collator::Collator(bool, bool, const optional<std::string>& locale_) : impl(std::make_shared<Impl>(locale_)) {} int Collator::compare(const std::string& lhs, const std::string& rhs) const { return impl->compare(lhs, rhs); diff --git a/platform/android/src/text/local_glyph_rasterizer.cpp b/platform/android/src/text/local_glyph_rasterizer.cpp index 8892ee3f37..0627eb109e 100644 --- a/platform/android/src/text/local_glyph_rasterizer.cpp +++ b/platform/android/src/text/local_glyph_rasterizer.cpp @@ -89,9 +89,8 @@ private: android::LocalGlyphRasterizer androidLocalGlyphRasterizer; }; -LocalGlyphRasterizer::LocalGlyphRasterizer(const optional<std::string> fontFamily) - : impl(std::make_unique<Impl>(fontFamily)) -{} +LocalGlyphRasterizer::LocalGlyphRasterizer(const optional<std::string>& fontFamily) + : impl(std::make_unique<Impl>(fontFamily)) {} LocalGlyphRasterizer::~LocalGlyphRasterizer() {} |