From b49517b73705e69d401925658ae0657b8a98b6a6 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Fri, 27 Mar 2020 18:30:35 +0200 Subject: [core] Fix performance-unnecessary-value-param errors in header files As reported by clang-tidy-8. --- include/mbgl/renderer/renderer_observer.hpp | 2 +- include/mbgl/storage/file_source.hpp | 4 +++- include/mbgl/storage/offline.hpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/mbgl/renderer/renderer_observer.hpp b/include/mbgl/renderer/renderer_observer.hpp index e0fc84215e..5d5a7bb5fe 100644 --- a/include/mbgl/renderer/renderer_observer.hpp +++ b/include/mbgl/renderer/renderer_observer.hpp @@ -34,7 +34,7 @@ public: // Style is missing an image using StyleImageMissingCallback = std::function; - virtual void onStyleImageMissing(const std::string&, StyleImageMissingCallback done) { done(); } + virtual void onStyleImageMissing(const std::string&, const StyleImageMissingCallback& done) { done(); } virtual void onRemoveUnusedStyleImages(const std::vector&) {} }; diff --git a/include/mbgl/storage/file_source.hpp b/include/mbgl/storage/file_source.hpp index 0ce88981a5..562fd8da08 100644 --- a/include/mbgl/storage/file_source.hpp +++ b/include/mbgl/storage/file_source.hpp @@ -48,6 +48,8 @@ public: // Allows to forward response from one source to another. // Optionally, callback can be provided to receive notification for forward // operation. + // + // NOLINTNEXTLINE(performance-unnecessary-value-param) virtual void forward(const Resource&, const Response&, std::function) {} // When a file source supports consulting a local cache only, it must return true. @@ -82,7 +84,7 @@ public: virtual mapbox::base::Value getProperty(const std::string&) const { return {}; }; // When supported, sets the modifier of the requested resources. - virtual void setResourceTransform(ResourceTransform) {} + virtual void setResourceTransform(ResourceTransform) {} // NOLINT(performance-unnecessary-value-param) protected: FileSource() = default; diff --git a/include/mbgl/storage/offline.hpp b/include/mbgl/storage/offline.hpp index f35abbfe38..97e7fc2e49 100644 --- a/include/mbgl/storage/offline.hpp +++ b/include/mbgl/storage/offline.hpp @@ -191,7 +191,7 @@ public: * responsibility of the SDK bindings to wrap this object in an interface that * re-executes the user-provided implementation on the main thread. */ - virtual void responseError(Response::Error) {} + virtual void responseError(Response::Error) {} // NOLINT(performance-unnecessary-value-param) /* * Implement this method to be notified when the limit on the number of Mapbox -- cgit v1.2.1