From 3ceabcd3ec91dbd9458d3c5b78fb12c3182636e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Wed, 3 Apr 2019 12:27:14 +0200 Subject: [core] clang-tidy fixes --- platform/default/src/mbgl/storage/default_file_source.cpp | 3 ++- platform/default/src/mbgl/storage/offline.cpp | 3 ++- platform/default/src/mbgl/text/bidi.cpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'platform/default') diff --git a/platform/default/src/mbgl/storage/default_file_source.cpp b/platform/default/src/mbgl/storage/default_file_source.cpp index 4d812044cf..1ccf999109 100644 --- a/platform/default/src/mbgl/storage/default_file_source.cpp +++ b/platform/default/src/mbgl/storage/default_file_source.cpp @@ -14,13 +14,14 @@ #include #include +#include namespace mbgl { class DefaultFileSource::Impl { public: Impl(std::shared_ptr assetFileSource_, std::string cachePath, uint64_t maximumCacheSize) - : assetFileSource(assetFileSource_) + : assetFileSource(std::move(assetFileSource_)) , localFileSource(std::make_unique()) , offlineDatabase(std::make_unique(cachePath, maximumCacheSize)) { } diff --git a/platform/default/src/mbgl/storage/offline.cpp b/platform/default/src/mbgl/storage/offline.cpp index fd945c724f..dd809ad129 100644 --- a/platform/default/src/mbgl/storage/offline.cpp +++ b/platform/default/src/mbgl/storage/offline.cpp @@ -10,6 +10,7 @@ #include #include +#include namespace mbgl { @@ -33,7 +34,7 @@ OfflineTilePyramidRegionDefinition::OfflineTilePyramidRegionDefinition( // OfflineGeometryRegionDefinition OfflineGeometryRegionDefinition::OfflineGeometryRegionDefinition(std::string styleURL_, Geometry geometry_, double minZoom_, double maxZoom_, float pixelRatio_, bool includeIdeographs_) - : styleURL(styleURL_) + : styleURL(std::move(styleURL_)) , geometry(std::move(geometry_)) , minZoom(minZoom_) , maxZoom(maxZoom_) diff --git a/platform/default/src/mbgl/text/bidi.cpp b/platform/default/src/mbgl/text/bidi.cpp index 32a3dc23ef..6bb2d36446 100644 --- a/platform/default/src/mbgl/text/bidi.cpp +++ b/platform/default/src/mbgl/text/bidi.cpp @@ -180,7 +180,7 @@ std::vector BiDi::processStyledText(const StyledText& input, std::se std::u16string BiDi::writeReverse(const std::u16string& input, std::size_t logicalStart, std::size_t logicalEnd) { UErrorCode errorCode = U_ZERO_ERROR; - int32_t logicalLength = static_cast(logicalEnd - logicalStart); + auto logicalLength = static_cast(logicalEnd - logicalStart); std::u16string outputText(logicalLength + 1, 0); // UBIDI_DO_MIRRORING: Apply unicode mirroring of characters like parentheses -- cgit v1.2.1