[core] Fix performance-unnecessary-value-param errors in header files
As reported by clang-tidy-8.
This commit is contained in:
@@ -167,7 +167,7 @@ void Map::Impl::jumpTo(const CameraOptions& camera) {
|
||||
onUpdate();
|
||||
}
|
||||
|
||||
void Map::Impl::onStyleImageMissing(const std::string& id, std::function<void()> done) {
|
||||
void Map::Impl::onStyleImageMissing(const std::string& id, const std::function<void()>& done) {
|
||||
if (!style->getImage(id)) observer.onStyleImageMissing(id);
|
||||
|
||||
done();
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
void onDidFinishRenderingFrame(RenderMode, bool, bool) final;
|
||||
void onWillStartRenderingMap() final;
|
||||
void onDidFinishRenderingMap() final;
|
||||
void onStyleImageMissing(const std::string&, std::function<void()>) final;
|
||||
void onStyleImageMissing(const std::string&, const std::function<void()>&) final;
|
||||
void onRemoveUnusedStyleImages(const std::vector<std::string>&) final;
|
||||
|
||||
// Map
|
||||
|
||||
@@ -8,7 +8,7 @@ class ImageManagerObserver {
|
||||
public:
|
||||
virtual ~ImageManagerObserver() = default;
|
||||
|
||||
virtual void onStyleImageMissing(const std::string&, std::function<void()> done) { done(); }
|
||||
virtual void onStyleImageMissing(const std::string&, const std::function<void()>& done) { done(); }
|
||||
virtual void onRemoveUnusedStyleImages(const std::vector<std::string>&) {}
|
||||
};
|
||||
|
||||
|
||||
@@ -727,8 +727,8 @@ void RenderOrchestrator::onTileChanged(RenderSource&, const OverscaledTileID&) {
|
||||
observer->onInvalidate();
|
||||
}
|
||||
|
||||
void RenderOrchestrator::onStyleImageMissing(const std::string& id, std::function<void()> done) {
|
||||
observer->onStyleImageMissing(id, std::move(done));
|
||||
void RenderOrchestrator::onStyleImageMissing(const std::string& id, const std::function<void()>& done) {
|
||||
observer->onStyleImageMissing(id, done);
|
||||
}
|
||||
|
||||
void RenderOrchestrator::onRemoveUnusedStyleImages(const std::vector<std::string>& unusedImageIDs) {
|
||||
|
||||
@@ -100,7 +100,7 @@ private:
|
||||
void onTileError(RenderSource&, const OverscaledTileID&, std::exception_ptr) override;
|
||||
|
||||
// ImageManagerObserver implementation
|
||||
void onStyleImageMissing(const std::string&, std::function<void()>) override;
|
||||
void onStyleImageMissing(const std::string&, const std::function<void()>&) override;
|
||||
void onRemoveUnusedStyleImages(const std::vector<std::string>&) override;
|
||||
|
||||
RendererObserver* observer;
|
||||
|
||||
@@ -15,7 +15,10 @@ class Image;
|
||||
class SpriteLoaderObserver {
|
||||
public:
|
||||
virtual ~SpriteLoaderObserver() = default;
|
||||
|
||||
// NOLINTNEXTLINE(performance-unnecessary-value-param)
|
||||
virtual void onSpriteLoaded(std::vector<Immutable<style::Image::Impl>>) {}
|
||||
|
||||
virtual void onSpriteError(std::exception_ptr) {}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user