[core] Fix unused-parameter warnings

Signed-off-by: Andrew Shkrob <andrew.shkrob.social@yandex.by>
This commit is contained in:
Andrew Shkrob 2024-05-06 21:29:22 +02:00
parent fde252347f
commit 71d74ed207
120 changed files with 323 additions and 355 deletions

View file

@ -253,7 +253,7 @@ bool IsActive(WeekdayRange const & range, std::tm const & date)
return range.HasWday(wday);
}
bool IsActive(Holiday const & holiday, std::tm const & date)
bool IsActive(Holiday const & /* holiday */, std::tm const & /* date */)
{
return false;
}

View file

@ -126,7 +126,7 @@ UNIT_TEST(LruCacheSmokeTest)
using Value = int;
{
LruCacheTest<Key, Value> cache(1 /* maxCacheSize */, [](Key k, Value & v) { v = 1; } /* loader */);
LruCacheTest<Key, Value> cache(1 /* maxCacheSize */, [](Key, Value & v) { v = 1; } /* loader */);
TEST_EQUAL(cache.GetValue(1), 1, ());
TEST_EQUAL(cache.GetValue(2), 1, ());
TEST_EQUAL(cache.GetValue(3), 1, ());

View file

@ -144,7 +144,7 @@ std::string DebugPrint(std::optional<T> const & p)
return "nullopt";
}
std::string inline DebugPrint(std::nullopt_t const & p)
std::string inline DebugPrint(std::nullopt_t const &)
{
return "nullopt";
}

View file

@ -12,6 +12,8 @@ PProf::PProf(std::string const & path)
{
#if defined(USE_PPROF)
ProfilerStart(path.c_str());
#else
UNUSED_VALUE(path);
#endif
}

View file

@ -1,5 +1,7 @@
#pragma once
#include "base/macros.hpp"
#include <sstream>
#include <string>
@ -42,11 +44,13 @@ private:
template <typename Visitor> \
void Visit(Visitor & visitor) \
{ \
UNUSED_VALUE(visitor); \
__VA_ARGS__; \
} \
template <typename Visitor> \
void Visit(Visitor & visitor) const \
{ \
UNUSED_VALUE(visitor); \
__VA_ARGS__; \
}

View file

@ -1,7 +1,6 @@
# Flags for all
set(OMIM_WARNING_FLAGS
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall -Wextra -Wpedantic>
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-unused-parameter> # We have a lot of functions with unused parameters
)
set(3PARTY_INCLUDE_DIRS "${OMIM_ROOT}/3party/boost")
set(OMIM_DATA_DIR "${OMIM_ROOT}/data")

View file

@ -81,7 +81,7 @@ UNIT_TEST(MultilangString_ForEach)
size_t index = 0;
vector<string> const expected = {"default", "en", "ru"};
vector<string> actual;
s.ForEach([&index, &actual](char lang, string_view)
s.ForEach([&index, &actual](char, string_view)
{
actual.push_back(gArr[index].m_lang);
++index;

View file

@ -53,7 +53,7 @@ public:
using PairsOfStrings = std::vector<std::pair<std::string, std::string>>;
using Strings = std::vector<std::string>;
void CharData(std::string const & ch) {}
void CharData(std::string const & /* ch */) {}
void AddAttr(std::string key, std::string value)
{

View file

@ -41,8 +41,8 @@ struct VAOAcceptor
class TestExtension : public dp::BaseRenderStateExtension
{
public:
bool Less(ref_ptr<dp::BaseRenderStateExtension> other) const override { return false; }
bool Equal(ref_ptr<dp::BaseRenderStateExtension> other) const override { return true; }
bool Less(ref_ptr<dp::BaseRenderStateExtension>) const override { return false; }
bool Equal(ref_ptr<dp::BaseRenderStateExtension>) const override { return true; }
};
class BatcherExpectations

View file

@ -34,7 +34,7 @@ class UploadedRender
public:
explicit UploadedRender(QPoint const & pen) : m_pen(pen) {}
void glMemoryToQImage(int x, int y, int w, int h, glConst f, glConst t, void const * memory)
void glMemoryToQImage(int x, int /* y */, int w, int h, glConst f, glConst t, void const * memory)
{
TEST(f == gl_const::GLAlpha || f == gl_const::GLAlpha8 || f == gl_const::GLRed, ());
TEST(t == gl_const::GLUnsignedByteType, ());

View file

@ -11,29 +11,28 @@ public:
void Present() override {}
void MakeCurrent() override {}
void SetFramebuffer(ref_ptr<dp::BaseFramebuffer> framebuffer) override {}
void ForgetFramebuffer(ref_ptr<dp::BaseFramebuffer> framebuffer) override {}
void ApplyFramebuffer(std::string const & framebufferLabel) override {}
void SetFramebuffer(ref_ptr<dp::BaseFramebuffer>) override {}
void ForgetFramebuffer(ref_ptr<dp::BaseFramebuffer>) override {}
void ApplyFramebuffer(std::string const &) override {}
void Init(dp::ApiVersion apiVersion) override {}
void Init(dp::ApiVersion) override {}
dp::ApiVersion GetApiVersion() const override { return m_apiVersion; }
std::string GetRendererName() const override { return {}; }
std::string GetRendererVersion() const override { return {}; }
void PushDebugLabel(std::string const & label) override {}
void PushDebugLabel(std::string const &) override {}
void PopDebugLabel() override {}
void SetClearColor(dp::Color const & color) override {}
void Clear(uint32_t clearBits, uint32_t storeBits) override {}
void SetClearColor(dp::Color const &) override {}
void Clear(uint32_t, uint32_t) override {}
void Flush() override {}
void SetViewport(uint32_t x, uint32_t y, uint32_t w, uint32_t h) override {}
void SetDepthTestEnabled(bool enabled) override {}
void SetDepthTestFunction(dp::TestFunction depthFunction) override {}
void SetStencilTestEnabled(bool enabled) override {}
void SetStencilFunction(dp::StencilFace face, dp::TestFunction stencilFunction) override {}
void SetStencilActions(dp::StencilFace face, dp::StencilAction stencilFailAction,
dp::StencilAction depthFailAction, dp::StencilAction passAction) override {}
void SetStencilReferenceValue(uint32_t stencilReferenceValue) override {}
void SetViewport(uint32_t, uint32_t, uint32_t, uint32_t) override {}
void SetDepthTestEnabled(bool) override {}
void SetDepthTestFunction(dp::TestFunction) override {}
void SetStencilTestEnabled(bool) override {}
void SetStencilFunction(dp::StencilFace, dp::TestFunction) override {}
void SetStencilActions(dp::StencilFace, dp::StencilAction, dp::StencilAction, dp::StencilAction) override {}
void SetStencilReferenceValue(uint32_t) override {}
private:
dp::ApiVersion m_apiVersion = dp::ApiVersion::OpenGLES2;

View file

@ -32,7 +32,7 @@ public:
, m_size(size)
{}
void Compare(int32_t id, T const * memory)
void Compare(int32_t /* id */, T const * memory)
{
m_result = memcmp(m_memory, memory, m_size) == 0;
}
@ -48,7 +48,7 @@ private:
uint32_t m_size;
};
void mock_glGetActiveUniform(uint32_t programID, uint32_t index, int32_t * size,
void mock_glGetActiveUniform(uint32_t /* programID */, uint32_t index, int32_t * size,
glConst * type, std::string & name)
{
*size = 1;

View file

@ -13,7 +13,7 @@ namespace dp
class FramebufferTexture : public Texture
{
public:
ref_ptr<ResourceInfo> FindResource(Key const & key, bool & newResource) override { return nullptr; }
ref_ptr<ResourceInfo> FindResource(Key const &, bool &) override { return nullptr; }
};
using FramebufferFallback = std::function<bool()>;

View file

@ -18,8 +18,8 @@ public:
virtual GraphicsContext * GetResourcesUploadContext() = 0;
virtual bool IsDrawContextCreated() const { return false; }
virtual bool IsUploadContextCreated() const { return false; }
virtual void WaitForInitialization(dp::GraphicsContext * context) {}
virtual void SetPresentAvailable(bool available) {}
virtual void WaitForInitialization(dp::GraphicsContext * /* context */) {}
virtual void SetPresentAvailable(bool /* available */) {}
};
class ThreadSafeFactory : public GraphicsContextFactory

View file

@ -206,7 +206,7 @@ void OpenGLHWTexture::Create(ref_ptr<dp::GraphicsContext> context, Params const
GLFunctions::glFlush();
}
void OpenGLHWTexture::UploadData(ref_ptr<dp::GraphicsContext> context, uint32_t x, uint32_t y,
void OpenGLHWTexture::UploadData(ref_ptr<dp::GraphicsContext>, uint32_t x, uint32_t y,
uint32_t width, uint32_t height, ref_ptr<void> data)
{
ASSERT(Validate(), ());

View file

@ -11,11 +11,11 @@ public:
ApiVersion GetApiVersion() const override;
std::string GetRendererName() const override;
std::string GetRendererVersion() const override;
void ForgetFramebuffer(ref_ptr<dp::BaseFramebuffer> framebuffer) override {}
void ApplyFramebuffer(std::string const & framebufferLabel) override {}
void ForgetFramebuffer(ref_ptr<dp::BaseFramebuffer>) override {}
void ApplyFramebuffer(std::string const &) override {}
void DebugSynchronizeWithCPU() override;
void PushDebugLabel(std::string const & label) override {}
void PushDebugLabel(std::string const &) override {}
void PopDebugLabel() override {}
void SetClearColor(dp::Color const & color) override;
@ -30,6 +30,6 @@ public:
StencilAction passAction) override;
// Do not use custom stencil reference value in OpenGL rendering.
void SetStencilReferenceValue(uint32_t stencilReferenceValue) override {}
void SetStencilReferenceValue(uint32_t) override {}
};
} // namespace dp

View file

@ -41,7 +41,7 @@ Blending::Blending(bool isEnabled)
: m_isEnabled(isEnabled)
{}
void Blending::Apply(ref_ptr<GraphicsContext> context, ref_ptr<GpuProgram> program) const
void Blending::Apply(ref_ptr<GraphicsContext> context, ref_ptr<GpuProgram>) const
{
// For Metal Rendering these settings must be set in the pipeline state.
auto const apiVersion = context->GetApiVersion();

View file

@ -48,7 +48,7 @@ public:
virtual ~Texture() = default;
virtual ref_ptr<ResourceInfo> FindResource(Key const & key, bool & newResource) = 0;
virtual void UpdateState(ref_ptr<dp::GraphicsContext> context) {}
virtual void UpdateState(ref_ptr<dp::GraphicsContext> /* context */) {}
virtual bool HasEnoughSpace(uint32_t /* newKeysCount */) const { return true; }
using Params = HWTexture::Params;

View file

@ -37,7 +37,7 @@ public:
virtual void RenderRange(ref_ptr<GraphicsContext> context,
bool drawAsLine, IndicesRange const & range) = 0;
virtual void AddBindingInfo(dp::BindingInfo const & bindingInfo) {}
virtual void AddBindingInfo(dp::BindingInfo const & /* bindingInfo */) {}
};
namespace metal

View file

@ -326,7 +326,7 @@ void VulkanBaseContext::ForgetFramebuffer(ref_ptr<dp::BaseFramebuffer> framebuff
DestroyRenderPassAndFramebuffer(framebuffer);
}
void VulkanBaseContext::ApplyFramebuffer(std::string const & framebufferLabel)
void VulkanBaseContext::ApplyFramebuffer(std::string const &)
{
vkCmdSetStencilReference(m_renderingCommandBuffers[m_inflightFrameIndex], VK_STENCIL_FRONT_AND_BACK,
m_stencilReferenceValue);

View file

@ -53,7 +53,7 @@ public:
bool HasPartialTextureUpdates() const override;
void DebugSynchronizeWithCPU() override {}
void PushDebugLabel(std::string const & label) override {}
void PushDebugLabel(std::string const &) override {}
void PopDebugLabel() override {}
void SetClearColor(Color const & color) override;

View file

@ -37,7 +37,7 @@ public:
, m_descriptorUpdater(objectManager)
{}
void Build(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program) override
void Build(ref_ptr<dp::GraphicsContext>, ref_ptr<dp::GpuProgram>) override
{
m_geometryBuffers.resize(m_mesh->m_buffers.size());
m_bindingInfoCount = static_cast<uint8_t>(m_mesh->m_buffers.size());
@ -165,7 +165,7 @@ public:
vkCmdDraw(commandBuffer, verticesCount, 1, 0, 0);
}
void Bind(ref_ptr<dp::GpuProgram> program) override {}
void Bind(ref_ptr<dp::GpuProgram>) override {}
void Unbind() override {}
private:

View file

@ -80,7 +80,7 @@ VkBufferImageCopy BufferCopyRegion(uint32_t x, uint32_t y, uint32_t width, uint3
}
} // namespace
drape_ptr<HWTexture> VulkanTextureAllocator::CreateTexture(ref_ptr<dp::GraphicsContext> context)
drape_ptr<HWTexture> VulkanTextureAllocator::CreateTexture(ref_ptr<dp::GraphicsContext>)
{
return make_unique_dp<VulkanTexture>(make_ref(this));
}

View file

@ -45,7 +45,7 @@ public:
bool Bind() override { return true; }
void Unbind() override {}
void BindBuffers(dp::BuffersMap const & buffers) const override {}
void BindBuffers(dp::BuffersMap const &) const override {}
void RenderRange(ref_ptr<GraphicsContext> context, bool drawAsLine,
IndicesRange const & range) override

View file

@ -87,7 +87,7 @@ public:
virtual ~Animation() = default;
virtual void Init(ScreenBase const & screen, TPropertyCache const & properties) {}
virtual void Init(ScreenBase const & /* screen */, TPropertyCache const & /* properties */) {}
virtual void OnStart() { if (m_onStartAction != nullptr) m_onStartAction(this); }
virtual void OnFinish() { if (m_onFinishAction != nullptr) m_onFinishAction(this); }
virtual void Interrupt() { if (m_onInterruptAction != nullptr) m_onInterruptAction(this); }

View file

@ -18,7 +18,7 @@ ArrowAnimation::ArrowAnimation(m2::PointD const & startPos, m2::PointD const & e
m_properties.insert(Animation::ObjectProperty::Angle);
}
void ArrowAnimation::Init(ScreenBase const & screen, TPropertyCache const & properties)
void ArrowAnimation::Init(ScreenBase const &, TPropertyCache const & properties)
{
PropertyValue value;
double minDuration;
@ -64,7 +64,7 @@ bool ArrowAnimation::HasObject(Object object) const
return object == Animation::Object::MyPositionArrow;
}
Animation::TObjectProperties const & ArrowAnimation::GetProperties(Object object) const
Animation::TObjectProperties const & ArrowAnimation::GetProperties(Object) const
{
return m_properties;
}

View file

@ -180,7 +180,7 @@ bool MapFollowAnimation::GetTargetProperty(Object object, ObjectProperty propert
return GetProperty(object, property, true /* targetValue */, value);
}
bool MapFollowAnimation::GetProperty(Object object, ObjectProperty property, bool targetValue, PropertyValue & value) const
bool MapFollowAnimation::GetProperty(Object, ObjectProperty property, bool targetValue, PropertyValue & value) const
{
if (property == Animation::ObjectProperty::Position)
{

View file

@ -58,12 +58,12 @@ bool SequenceAnimation::HasTargetProperty(Object object, ObjectProperty property
return false;
}
void SequenceAnimation::SetMaxDuration(double maxDuration)
void SequenceAnimation::SetMaxDuration(double)
{
ASSERT(false, ("Not implemented"));
}
void SequenceAnimation::SetMinDuration(double minDuration)
void SequenceAnimation::SetMinDuration(double)
{
ASSERT(false, ("Not implemented"));
}

View file

@ -7,7 +7,7 @@
namespace df
{
bool IsAnimationAllowed(double duration, ScreenBase const & screen)
bool IsAnimationAllowed(double duration, ScreenBase const &)
{
return duration > 0.0 && duration <= kMaxAnimationTimeSec;
}

View file

@ -69,12 +69,12 @@ void * FileOpen(char const * path, void * userData)
return userData;
}
void FileClose(void * file, void * userData)
void FileClose(void * /* file */, void * /* userData */)
{
// Do nothing.
}
size_t FileRead(void * file, void * dst, size_t bytes, void * userData)
size_t FileRead(void * /* file */, void * dst, size_t bytes, void * userData)
{
auto reader = static_cast<ReaderSource<ReaderPtr<Reader>> *>(userData);
CHECK(reader != nullptr, ());
@ -91,7 +91,7 @@ size_t FileRead(void * file, void * dst, size_t bytes, void * userData)
return static_cast<size_t>(reader->Pos() - p);
}
unsigned long FileSize(void * file, void * userData)
unsigned long FileSize(void * /* file */, void * userData)
{
auto reader = static_cast<ReaderSource<ReaderPtr<Reader>> *>(userData);
CHECK(reader != nullptr, ());

View file

@ -112,6 +112,7 @@ void CirclesPackHandle::GetPixelShape(ScreenBase const & screen, bool perspectiv
{
UNUSED_VALUE(screen);
UNUSED_VALUE(perspective);
UNUSED_VALUE(rects);
}
void CirclesPackHandle::SetPoint(size_t index, m2::PointD const & position, float radius,

View file

@ -28,7 +28,7 @@ drape_ptr<dp::MeshObject> CreateMesh(ref_ptr<dp::GraphicsContext> context, ref_p
}
} // namespace
DebugRectRenderer::DebugRectRenderer(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
DebugRectRenderer::DebugRectRenderer(ref_ptr<dp::GraphicsContext>, ref_ptr<dp::GpuProgram> program,
ref_ptr<gpu::ProgramParamsSetter> paramsSetter)
: m_program(program)
, m_paramsSetter(paramsSetter)

View file

@ -23,25 +23,25 @@ public:
m_stream.SetTestBridge(std::bind(&UserEventStreamTest::TestBridge, this, _1));
}
void OnTap(m2::PointD const & pt, bool isLong) override {}
void OnForceTap(m2::PointD const & pt) override {}
void OnDoubleTap(m2::PointD const & pt) override {}
void OnTap(m2::PointD const & /* pt */, bool /* isLong */) override {}
void OnForceTap(m2::PointD const & /* pt */) override {}
void OnDoubleTap(m2::PointD const & /* pt */) override {}
void OnTwoFingersTap() override {}
bool OnSingleTouchFiltrate(m2::PointD const & pt, df::TouchEvent::ETouchType type) override { return m_filtrate; }
bool OnSingleTouchFiltrate(m2::PointD const & /* pt */, df::TouchEvent::ETouchType /* type */) override { return m_filtrate; }
void OnDragStarted() override {}
void OnDragEnded(m2::PointD const & /* distance */) override {}
void OnRotated() override {}
void OnScrolled(m2::PointD const & distance) override {}
void OnScrolled(m2::PointD const & /* distance */) override {}
void OnScaleStarted() override {}
void CorrectScalePoint(m2::PointD & pt) const override {}
void CorrectScalePoint(m2::PointD & pt1, m2::PointD & pt2) const override {}
void CorrectGlobalScalePoint(m2::PointD & pt) const override {}
void CorrectScalePoint(m2::PointD & /* pt */) const override {}
void CorrectScalePoint(m2::PointD & /* pt1 */, m2::PointD & /* pt2 */) const override {}
void CorrectGlobalScalePoint(m2::PointD & /* pt */) const override {}
void OnScaleEnded() override {}
void OnTouchMapAction(df::TouchEvent::ETouchType touchType, bool isMapTouch) override {}
void OnTouchMapAction(df::TouchEvent::ETouchType /* touchType */, bool /* isMapTouch */) override {}
void OnAnimatedScaleEnded() override {}
bool OnNewVisibleViewport(m2::RectD const & oldViewport, m2::RectD const & newViewport,
bool needOffset, m2::PointD & gOffset) override
bool OnNewVisibleViewport(m2::RectD const & /* oldViewport */, m2::RectD const & /* newViewport */,
bool /* needOffset */, m2::PointD & /* gOffset */) override
{
return false;
}

View file

@ -9,25 +9,29 @@
namespace df
{
#define DECLARE_SETTER(name, field) \
template<typename T> struct Check##name \
{ \
private: \
static void Detect(...); \
template<typename U> static decltype(std::declval<U>().field) Detect(U const &); \
public: \
static constexpr bool Value = !std::is_same<void, decltype(Detect(std::declval<T>()))>::value; \
}; \
template <typename ParamsType> \
std::enable_if_t<Check##name<ParamsType>::Value> \
name(ParamsType & params) const \
{ \
params.field = field; \
} \
template <typename ParamsType> \
std::enable_if_t<!Check##name<ParamsType>::Value> \
name(ParamsType & params) const {}
#define DECLARE_SETTER(name, field) \
template <typename T> \
struct Check##name \
{ \
private: \
static void Detect(...); \
template <typename U> \
static decltype(std::declval<U>().field) Detect(U const &); \
\
public: \
static constexpr bool Value = !std::is_same<void, decltype(Detect(std::declval<T>()))>::value; \
}; \
\
template <typename ParamsType> \
std::enable_if_t<Check##name<ParamsType>::Value> name(ParamsType & params) const \
{ \
params.field = field; \
} \
\
template <typename ParamsType> \
std::enable_if_t<!Check##name<ParamsType>::Value> name(ParamsType &) const \
{ \
}
struct FrameValues
{

View file

@ -44,8 +44,8 @@ void AddSymbols(std::string const & str, std::set<char> & symbols)
symbols.insert(str[i]);
}
void DebugInfoLabels::AddLabel(ref_ptr<dp::TextureManager> tex, std::string const & caption,
TUpdateDebugLabelFn const & onUpdateFn)
void DebugInfoLabels::AddLabel(ref_ptr<dp::TextureManager>, std::string const & caption,
TUpdateDebugLabelFn const &)
{
std::string alphabet;
std::set<char> symbols;

View file

@ -114,7 +114,7 @@ public:
{}
private:
void UpdateImpl(ScreenBase const & screen, RulerHelper const & helper) override
void UpdateImpl(ScreenBase const &, RulerHelper const & helper) override
{
if (!IsVisible())
return;

View file

@ -19,7 +19,7 @@ Handle::Handle(uint32_t id, dp::Anchor anchor, m2::PointF const & pivot, m2::Poi
, m_size(size)
{}
bool Handle::Update(ScreenBase const & screen)
bool Handle::Update(ScreenBase const &)
{
using namespace glsl;
@ -40,7 +40,7 @@ bool Handle::IndexesRequired() const
return false;
}
m2::RectD Handle::GetPixelRect(ScreenBase const & screen, bool perspective) const
m2::RectD Handle::GetPixelRect(ScreenBase const &, bool perspective) const
{
// There is no need to check intersection of gui elements.
UNUSED_VALUE(perspective);

View file

@ -72,7 +72,7 @@ public:
m_duration = maxDuration;
}
void SetMinDuration(double minDuration) override {}
void SetMinDuration(double /* minDuration */) override {}
double GetMaxDuration() const override { return Animation::kInvalidAnimationDuration; }
double GetMinDuration() const override { return Animation::kInvalidAnimationDuration; }

View file

@ -61,7 +61,7 @@ template <typename TVertex>
class BaseLineBuilder : public LineShapeInfo
{
public:
BaseLineBuilder(BaseBuilderParams const & params, size_t geomsSize, size_t joinsSize)
BaseLineBuilder(BaseBuilderParams const & params, size_t geomsSize, size_t /* joinsSize */)
: m_params(params)
, m_colorCoord(glsl::ToVec2(params.m_color.GetTexRect().Center()))
{
@ -339,7 +339,7 @@ LineShape::LineShape(m2::SharedSpline const & spline, LineViewParams const & par
}
template <typename TBuilder>
void LineShape::Construct(TBuilder & builder) const
void LineShape::Construct(TBuilder & /* builder */) const
{
ASSERT(false, ("No implementation"));
}
@ -442,7 +442,7 @@ void LineShape::Construct<SolidLineBuilder>(SolidLineBuilder & builder) const
bool const generateJoins = builder.GetHalfWidth() > 2.5f;
ForEachSplineSection([&](glsl::vec2 const & p1, glsl::vec2 const & p2,
glsl::vec2 const & tangent, double,
glsl::vec2 const & /* tangent */, double,
glsl::vec2 const & leftNormal, glsl::vec2 const & rightNormal,
int flag)
{

View file

@ -854,7 +854,7 @@ void MyPositionController::ActivateRouting(int zoomLevel, bool enableAutoZoom, b
ChangeMode(location::FollowAndRotate);
ChangeModelView(m_position, m_isDirectionAssigned ? m_drawDirection : 0.0,
GetRoutingRotationPixelCenter(), zoomLevel,
[this](ref_ptr<Animation> anim)
[this](const ref_ptr<Animation>&)
{
UpdateViewport(kDoNotChangeZoom);
});

View file

@ -68,7 +68,7 @@ bool SelectionShape::SelectionShape::IsVisible() const
return (state == ShowHideAnimation::STATE_VISIBLE || state == ShowHideAnimation::STATE_SHOW_DIRECTION);
}
std::optional<m2::PointD> SelectionShape::GetPixelPosition(ScreenBase const & screen, int zoomLevel) const
std::optional<m2::PointD> SelectionShape::GetPixelPosition(ScreenBase const & screen, int) const
{
if (!IsVisible())
return {};

View file

@ -57,7 +57,7 @@ void TextHandle::GetAttributeMutation(ref_ptr<dp::AttributeBufferMutator> mutato
m_isLastVisible = isVisible;
}
bool TextHandle::Update(ScreenBase const & screen)
bool TextHandle::Update(ScreenBase const &)
{
if (!m_glyphsReady)
m_glyphsReady = m_textureManager->AreGlyphsReady(m_text);

View file

@ -23,7 +23,7 @@ public:
, m_buffer(buffer)
{}
void SetPenPosition(glsl::vec2 const & penOffset) {}
void SetPenPosition(glsl::vec2 const & /* penOffset */) {}
void operator() (dp::TextureManager::GlyphRegion const & glyph)
{
@ -104,7 +104,7 @@ public:
, m_buffer(buffer)
{}
void SetPenPosition(glsl::vec2 const & penOffset) {}
void SetPenPosition(glsl::vec2 const & /* penOffset */) {}
void operator() (dp::TextureManager::GlyphRegion const & glyph)
{

View file

@ -296,11 +296,9 @@ void TextShape::DrawSubString(ref_ptr<dp::GraphicsContext> context, StraightText
DrawSubStringOutlined(context, layout, font, baseOffset, batcher, textures, isPrimary, isOptional);
}
void TextShape::DrawSubStringPlain(ref_ptr<dp::GraphicsContext> context,
StraightTextLayout const & layout, dp::FontDecl const & font,
glm::vec2 const & baseOffset, ref_ptr<dp::Batcher> batcher,
ref_ptr<dp::TextureManager> textures, bool isPrimary,
bool isOptional) const
void TextShape::DrawSubStringPlain(ref_ptr<dp::GraphicsContext> context, StraightTextLayout const & layout,
dp::FontDecl const & font, glm::vec2 const &, ref_ptr<dp::Batcher> batcher,
ref_ptr<dp::TextureManager> textures, bool isPrimary, bool isOptional) const
{
gpu::TTextStaticVertexBuffer staticBuffer;
gpu::TTextDynamicVertexBuffer dynamicBuffer;
@ -359,11 +357,9 @@ void TextShape::DrawSubStringPlain(ref_ptr<dp::GraphicsContext> context,
batcher->InsertListOfStrip(context, state, make_ref(&provider), std::move(handle), 4);
}
void TextShape::DrawSubStringOutlined(ref_ptr<dp::GraphicsContext> context,
StraightTextLayout const & layout, dp::FontDecl const & font,
glm::vec2 const & baseOffset, ref_ptr<dp::Batcher> batcher,
ref_ptr<dp::TextureManager> textures, bool isPrimary,
bool isOptional) const
void TextShape::DrawSubStringOutlined(ref_ptr<dp::GraphicsContext> context, StraightTextLayout const & layout,
dp::FontDecl const & font, glm::vec2 const &, ref_ptr<dp::Batcher> batcher,
ref_ptr<dp::TextureManager> textures, bool isPrimary, bool isOptional) const
{
gpu::TTextOutlinedStaticVertexBuffer staticBuffer;
gpu::TTextDynamicVertexBuffer dynamicBuffer;

View file

@ -880,8 +880,8 @@ StopNodeParamsPT & TransitSchemeBuilder::GetStopOrTransfer(MwmSchemeData & schem
return scheme.m_transfersPT[id];
}
void TransitSchemeBuilder::PrepareSchemePT(TransitDisplayInfo const & transitDisplayInfo,
LinesDataPT const & lineData, MwmSchemeData & scheme)
void TransitSchemeBuilder::PrepareSchemePT(TransitDisplayInfo const & transitDisplayInfo, LinesDataPT const &,
MwmSchemeData & scheme)
{
m2::RectD boundingRect;

View file

@ -361,7 +361,7 @@ bool UserEventStream::OnSetScale(ref_ptr<ScaleEvent> scaleEvent)
ScreenBase const & startScreen = GetCurrentScreen();
auto anim = GetScaleAnimation(startScreen, scaleCenter, glbScaleCenter, factor);
anim->SetOnFinishAction([this](ref_ptr<Animation> animation)
anim->SetOnFinishAction([this](const ref_ptr<Animation> &)
{
if (m_listener)
m_listener->OnAnimatedScaleEnded();
@ -1197,7 +1197,7 @@ void UserEventStream::DetectLongTap(Touch const & touch)
}
}
bool UserEventStream::DetectDoubleTap(Touch const & touch)
bool UserEventStream::DetectDoubleTap(Touch const &)
{
if (m_state != STATE_WAIT_DOUBLE_TAP || m_touchTimer.ElapsedMilliseconds() > kDoubleTapPauseMs)
return false;
@ -1227,7 +1227,7 @@ bool UserEventStream::DetectForceTap(Touch const & touch)
return false;
}
void UserEventStream::EndTapDetector(Touch const & touch)
void UserEventStream::EndTapDetector(Touch const &)
{
TEST_CALL(SHORT_TAP_DETECTED);
ASSERT_EQUAL(m_state, STATE_TAP_DETECTION, ());
@ -1273,7 +1273,7 @@ void UserEventStream::CancelFilter(Touch const & t)
m_listener->OnSingleTouchFiltrate(m2::PointD(t.m_location), TouchEvent::TOUCH_CANCEL);
}
void UserEventStream::StartDoubleTapAndHold(Touch const & touch)
void UserEventStream::StartDoubleTapAndHold(Touch const &)
{
TEST_CALL(BEGIN_DOUBLE_TAP_AND_HOLD);
ASSERT_EQUAL(m_state, STATE_WAIT_DOUBLE_TAP_HOLD, ());
@ -1298,7 +1298,7 @@ void UserEventStream::UpdateDoubleTapAndHold(Touch const & touch)
m_navigator.Scale(scaleCenter, scaleFactor);
}
void UserEventStream::EndDoubleTapAndHold(Touch const & touch)
void UserEventStream::EndDoubleTapAndHold(Touch const &)
{
TEST_CALL(END_DOUBLE_TAP_AND_HOLD);
ASSERT_EQUAL(m_state, STATE_DOUBLE_TAP_HOLD, ());

View file

@ -183,7 +183,7 @@ uint32_t CountFeaturesInRect(MwmSet::MwmId const & mwmId, m2::RectD const & rect
auto & editor = osm::Editor::Instance();
int unused = 0;
uint32_t counter = 0;
editor.ForEachCreatedFeature(mwmId, [&counter](uint32_t index) { ++counter; }, rect, unused);
editor.ForEachCreatedFeature(mwmId, [&counter](uint32_t) { ++counter; }, rect, unused);
return counter;
}
@ -325,7 +325,7 @@ void EditorTest::SetIndexTest()
});
uint32_t counter = 0;
editor.ForEachFeatureAtPoint([&counter](FeatureType & ft)
editor.ForEachFeatureAtPoint([&counter](FeatureType &)
{
++counter;
}, {100.0, 100.0});
@ -333,7 +333,7 @@ void EditorTest::SetIndexTest()
TEST_EQUAL(counter, 0, ());
counter = 0;
editor.ForEachFeatureAtPoint([&counter](FeatureType & ft)
editor.ForEachFeatureAtPoint([&counter](FeatureType &)
{
++counter;
}, {3.0, 3.0});
@ -341,7 +341,7 @@ void EditorTest::SetIndexTest()
TEST_EQUAL(counter, 1, ());
counter = 0;
editor.ForEachFeatureAtPoint([&counter](FeatureType & ft)
editor.ForEachFeatureAtPoint([&counter](FeatureType &)
{
++counter;
}, {1.0, 1.0});
@ -349,7 +349,7 @@ void EditorTest::SetIndexTest()
TEST_EQUAL(counter, 2, ());
counter = 0;
editor.ForEachFeatureAtPoint([&counter](FeatureType & ft)
editor.ForEachFeatureAtPoint([&counter](FeatureType &)
{
++counter;
}, {4.0, 4.0});
@ -591,7 +591,7 @@ void EditorTest::OnMapDeregisteredTest()
builder.Add(cafeMoscow);
});
auto nzMwmId = BuildMwm("NZ", [](TestMwmBuilder & builder)
auto nzMwmId = BuildMwm("NZ", [](TestMwmBuilder &)
{
});
m_dataSource.DeregisterMap(nzMwmId.GetInfo()->GetLocalFile().GetCountryFile());

View file

@ -156,7 +156,7 @@ AddressesCollector::AddressesCollector(std::string const & filename)
{
}
std::shared_ptr<CollectorInterface> AddressesCollector::Clone(IDRInterfacePtr const & cache) const
std::shared_ptr<CollectorInterface> AddressesCollector::Clone(IDRInterfacePtr const &) const
{
return std::make_shared<AddressesCollector>(GetFilename());
}

View file

@ -157,7 +157,7 @@ public:
{
}
void operator()(FeatureType & f, uint32_t const & id)
void operator()(FeatureType & f, uint32_t const & /* id */)
{
f.ParseHeader2();
if (!GetBicycleModel().IsRoad(feature::TypesHolder(f)))

View file

@ -48,9 +48,9 @@ UNIT_TEST(CrossMwmWeights)
using IdxWeightT = std::pair<uint32_t, uint32_t>;
std::vector<IdxWeightT> idx2weight;
connector.ForEachEnter([&](uint32_t enterIdx, Segment const & enter)
connector.ForEachEnter([&](uint32_t enterIdx, Segment const &)
{
connector.ForEachExit([&](uint32_t exitIdx, Segment const & exit)
connector.ForEachExit([&](uint32_t exitIdx, Segment const &)
{
uint32_t const idx = connector.GetWeightIndex(enterIdx, exitIdx);
uint32_t const weight = connector.GetWeight(enterIdx, exitIdx);

View file

@ -45,8 +45,8 @@ namespace
{
class TestAffiliation : public feature::AffiliationInterface
{
std::vector<std::string> GetAffiliations(feature::FeatureBuilder const & fb) const override { return {}; }
std::vector<std::string> GetAffiliations(m2::PointD const & point) const override { return {}; }
std::vector<std::string> GetAffiliations(feature::FeatureBuilder const & /* fb */) const override { return {}; }
std::vector<std::string> GetAffiliations(m2::PointD const & /* point */) const override { return {}; }
bool HasCountryByName(std::string const & name) const override
{

View file

@ -50,7 +50,7 @@ OsmElement RoadNode(uint64_t id, double lat, double lon)
}
void TestRunCmpPoints(std::vector<m2::PointD> const & pointsFact,
std::vector<m2::PointD> const & pointsPlan, double r)
std::vector<m2::PointD> const & pointsPlan, double /* r */)
{
TEST_EQUAL(pointsFact.size(), pointsPlan.size(), ());
TEST_GREATER(pointsFact.size(), 2, ());

View file

@ -8,17 +8,17 @@
UNIT_TEST(NodeMixerTests)
{
std::istringstream stream1("");
generator::MixFakeNodes(stream1, [](OsmElement & p) {
generator::MixFakeNodes(stream1, [](OsmElement &) {
TEST(false, ("Returned an object for an empty input stream."));
});
std::istringstream stream2("shop=gift\nname=Shop\n");
generator::MixFakeNodes(stream2, [](OsmElement & p) {
generator::MixFakeNodes(stream2, [](OsmElement &) {
TEST(false, ("Returned an object for a source without coordinates."));
});
std::istringstream stream3("lat=4.0\nlon=-4.1\n");
generator::MixFakeNodes(stream3, [](OsmElement & p) {
generator::MixFakeNodes(stream3, [](OsmElement &) {
TEST(false, ("Returned an object for a source without tags."));
});

View file

@ -120,8 +120,8 @@ class IntermediateDataTest : public cache::IntermediateDataReaderInterface
std::map<cache::Key, WayElement> m_map;
public:
virtual bool GetNode(cache::Key id, double & y, double & x) const { UNREACHABLE(); }
virtual bool GetWay(cache::Key id, WayElement & e)
bool GetNode(cache::Key, double &, double &) const override { UNREACHABLE(); }
bool GetWay(cache::Key id, WayElement & e) override
{
auto it = m_map.find(id);
if (it != m_map.end())
@ -131,7 +131,7 @@ public:
}
return false;
}
virtual bool GetRelation(cache::Key id, RelationElement & e) { UNREACHABLE(); }
bool GetRelation(cache::Key, RelationElement &) override { UNREACHABLE(); }
void Add(OsmElement const & e)
{
@ -199,12 +199,12 @@ class TestAccessFixture
class Way2Feature : public OsmWay2FeaturePoint
{
public:
virtual void ForEachFeature(uint64_t wayID, std::function<void (uint32_t)> const & fn) override
void ForEachFeature(uint64_t wayID, std::function<void (uint32_t)> const & fn) override
{
fn(base::checked_cast<uint32_t>(wayID));
}
virtual void ForEachNodeIdx(uint64_t wayID, uint32_t candidateIdx, m2::PointU pt,
std::function<void (uint32_t, uint32_t)> const & fn) override
void ForEachNodeIdx(uint64_t wayID, uint32_t, m2::PointU pt,
std::function<void(uint32_t, uint32_t)> const & fn) override
{
auto const ll = mercator::ToLatLon(PointUToPointD(pt, kPointCoordBits, mercator::Bounds::FullRect()));

View file

@ -1313,77 +1313,77 @@ void GetNameAndType(OsmElement * p, FeatureBuilderParams & params,
feature::AddressData addr;
TagProcessor(p).ApplyRules<void(string &, string &)>(
{
{"addr:housenumber", "*", [&houseNumber](string & k, string & v)
{"addr:housenumber", "*", [&houseNumber](string & /* k */, string & v)
{
houseNumber = std::move(v);
}},
{"addr:conscriptionnumber", "*", [&conscriptionHN](string & k, string & v)
{"addr:conscriptionnumber", "*", [&conscriptionHN](string & /* k */, string & v)
{
conscriptionHN = std::move(v);
}},
{"addr:provisionalnumber", "*", [&conscriptionHN](string & k, string & v)
{"addr:provisionalnumber", "*", [&conscriptionHN](string & /* k */, string & v)
{
conscriptionHN = std::move(v);
}},
{"addr:streetnumber", "*", [&streetHN](string & k, string & v)
{"addr:streetnumber", "*", [&streetHN](string & /* k */, string & v)
{
streetHN = std::move(v);
}},
{"contact:housenumber", "*", [&houseNumber](string & k, string & v)
{"contact:housenumber", "*", [&houseNumber](string & /* k */, string & v)
{
if (houseNumber.empty())
houseNumber = std::move(v);
}},
{"addr:housename", "*", [&houseName](string & k, string & v)
{"addr:housename", "*", [&houseName](string & /* k */, string & v)
{
houseName = std::move(v);
}},
{"addr:street", "*", [&addr](string & k, string & v)
{"addr:street", "*", [&addr](string & /* k */, string & v)
{
addr.Set(feature::AddressData::Type::Street, std::move(v));
}},
{"contact:street", "*", [&addr](string & k, string & v)
{"contact:street", "*", [&addr](string & /* k */, string & v)
{
addr.SetIfAbsent(feature::AddressData::Type::Street, std::move(v));
}},
{"addr:place", "*", [&addr](string & k, string & v)
{"addr:place", "*", [&addr](string & /* k */, string & v)
{
addr.Set(feature::AddressData::Type::Place, std::move(v));
}},
{"addr:city", "*", [&addrCity](string & k, string & v)
{"addr:city", "*", [&addrCity](string & /* k */, string & v)
{
addrCity = std::move(v);
}},
{"addr:suburb", "*", [&addrSuburb](string & k, string & v)
{"addr:suburb", "*", [&addrSuburb](string & /* k */, string & v)
{
addrSuburb = std::move(v);
}},
{"addr:postcode", "*", [&addrPostcode](string & k, string & v)
{"addr:postcode", "*", [&addrPostcode](string & /* k */, string & v)
{
addrPostcode = std::move(v);
}},
{"postal_code", "*", [&addrPostcode](string & k, string & v)
{"postal_code", "*", [&addrPostcode](string & /* k */, string & v)
{
addrPostcode = std::move(v);
}},
{"contact:postcode", "*", [&addrPostcode](string & k, string & v)
{"contact:postcode", "*", [&addrPostcode](string & /* k */, string & v)
{
if (addrPostcode.empty())
addrPostcode = std::move(v);
}},
{"population", "*", [&params](string & k, string & v)
{"population", "*", [&params](string & /* k */, string & v)
{
// Get population rank.
uint64_t const population = generator::osm_element::GetPopulation(v);
if (population != 0)
params.rank = feature::PopulationToRank(population);
}},
{"ref", "*", [&params](string & k, string & v)
{"ref", "*", [&params](string & /* k */, string & v)
{
// Get reference; its used for selected types only, see FeatureBuilder::PreSerialize().
params.ref = std::move(v);
}},
{"layer", "*", [&params](string & k, string & v)
{"layer", "*", [&params](string & /* k */, string & v)
{
// Get layer.
if (params.layer == feature::LAYER_EMPTY)
@ -1469,12 +1469,12 @@ void GetNameAndType(OsmElement * p, FeatureBuilderParams & params,
// Fetch piste:name and piste:ref if there are no other name/ref values.
TagProcessor(p).ApplyRules<void(string &, string &)>(
{
{"piste:ref", "*", [&params](string & k, string & v)
{"piste:ref", "*", [&params](string & /* k */, string & v)
{
if (params.ref.empty())
params.ref = std::move(v);
}},
{"piste:name", "*", [&params](string & k, string & v)
{"piste:name", "*", [&params](string & /* k */, string & v)
{
params.SetDefaultNameIfEmpty(std::move(v));
}},

View file

@ -139,7 +139,7 @@ void GetUSPostcodes(std::string const & filename, storage::CountryId const & cou
usFieldIndices.m_longIndex = 4;
usFieldIndices.m_datasetCount = 8;
auto const transformUsPostcode = [](std::string & postcode) { return true; };
auto const transformUsPostcode = [](std::string & /* postcode */) { return true; };
std::vector<std::pair<Key, Value>> usPostcodesKeyValuePairs;
std::vector<m2::PointD> usPostcodesValueMapping;

View file

@ -204,7 +204,7 @@ public:
RouteWeight GetAStarWeightEpsilon() { return RouteWeight(0.0); }
RouteWeight GetCrossBorderPenalty(NumMwmId mwmId1, NumMwmId mwmId2) { return RouteWeight(0); }
RouteWeight GetCrossBorderPenalty(NumMwmId /* mwmId1 */, NumMwmId /* mwmId2 */) { return RouteWeight(0); }
/// @}
ms::LatLon const & GetPoint(Segment const & s, bool forward)
@ -277,7 +277,7 @@ public:
/// and |VehicleType::Car|.
void CalcCrossMwmTransitions(
string const & mwmFile, string const & intermediateDir, string const & mappingFile,
vector<m2::RegionD> const & borders, string const & country,
vector<m2::RegionD> const & /* borders */, string const & country,
CountryParentNameGetterFn const & countryParentNameGetterFn,
CrossMwmConnectorBuilderEx<base::GeoObjectId> & builder)
{
@ -317,7 +317,7 @@ void CalcCrossMwmTransitions(
/// |transitions| will be equal to VehicleType::Transit after call of this method.
void CalcCrossMwmTransitions(
string const & mwmFile, string const & intermediateDir, string const & mappingFile,
vector<m2::RegionD> const & borders, string const & country,
vector<m2::RegionD> const & borders, string const & /* country */,
CountryParentNameGetterFn const & /* countryParentNameGetterFn */,
CrossMwmConnectorBuilderEx<connector::TransitId> & builder)
{
@ -380,7 +380,7 @@ void CalcCrossMwmTransitions(
/// \brief Fills |transitions| for experimental transit case. It means that Transition::m_roadMask
/// for items in |transitions| will be equal to VehicleType::Transit after the call of this method.
void CalcCrossMwmTransitionsExperimental(
string const & mwmFile, vector<m2::RegionD> const & borders, string const & country,
string const & mwmFile, vector<m2::RegionD> const & borders, string const & /* country */,
CountryParentNameGetterFn const & /* countryParentNameGetterFn */,
::transit::experimental::EdgeIdToFeatureId const & edgeIdToFeatureId,
CrossMwmConnectorBuilderEx<connector::TransitId> & builder)
@ -443,10 +443,10 @@ void CalcCrossMwmTransitionsExperimental(
// Dummy specialization. We need it to compile this function overload for experimental transit.
void CalcCrossMwmTransitionsExperimental(
string const & mwmFile, vector<m2::RegionD> const & borders, string const & country,
CountryParentNameGetterFn const & countryParentNameGetterFn,
::transit::experimental::EdgeIdToFeatureId const & edgeIdToFeatureId,
CrossMwmConnectorBuilderEx<base::GeoObjectId> & builder)
string const & /* mwmFile */, vector<m2::RegionD> const & /* borders */, string const & /* country */,
CountryParentNameGetterFn const & /* countryParentNameGetterFn */,
::transit::experimental::EdgeIdToFeatureId const & /* edgeIdToFeatureId */,
CrossMwmConnectorBuilderEx<base::GeoObjectId> & /* builder */)
{
CHECK(false, ("This is dummy specialization and it shouldn't be called."));
}

View file

@ -66,7 +66,7 @@ int main(int argc, char * argv[])
size_t all = 0;
size_t good = 0;
feature::ForEachFeature(path, [&](FeatureType & ft, uint32_t fid) {
feature::ForEachFeature(path, [&](FeatureType & ft, uint32_t /* fid */) {
if (!routing::IsRoad(feature::TypesHolder(ft)))
return;

View file

@ -185,7 +185,7 @@ void DeserializeFromJson(OsmIdToFeatureIdsMap const & mapping,
}
void ProcessGraph(std::string const & mwmPath, CountryId const & countryId,
OsmIdToFeatureIdsMap const & osmIdToFeatureIdsMap, GraphData & data)
OsmIdToFeatureIdsMap const & /* osmIdToFeatureIdsMap */, GraphData & data)
{
CalculateBestPedestrianSegments(mwmPath, countryId, data);
data.Sort();

View file

@ -142,15 +142,6 @@ set(SRC
validate_and_format_contacts.hpp
)
set(OTHER_FILES drules_struct.proto)
# Disable warnings.
set_source_files_properties(drules_struct.pb.cc PROPERTIES COMPILE_FLAGS
"$<$<CXX_COMPILER_ID:AppleClang,Clang>:-Wno-shorten-64-to-32> $<$<CXX_COMPILER_ID:GNU>:-Wno-deprecated-declarations>"
)
file(COPY ${OTHER_FILES} DESTINATION ${CMAKE_BINARY_DIR})
omim_add_library(${PROJECT_NAME} ${SRC})
target_link_libraries(${PROJECT_NAME}

View file

@ -2,14 +2,14 @@
#include "std/target_os.hpp"
// Surprisingly, clang defines __GNUC__
#if defined(__GNUC__) && !defined(__llvm__) && !defined(__INTEL_COMPILER)
#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif // defined(__GNUC__) && !defined(__llvm__) && !defined(__INTEL_COMPILER)
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif // defined(__GNUC__) && !defined(__INTEL_COMPILER)
#include "indexer/drules_struct.pb.h"
#if defined(__GNUC__) && !defined(__llvm__) && !defined(__INTEL_COMPILER)
#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
#pragma GCC diagnostic pop
#endif // defined(__GNUC__) && !defined(__llvm__) && !defined(__INTEL_COMPILER)
#endif // defined(__GNUC__) && !defined(__INTEL_COMPILER)

View file

@ -101,9 +101,8 @@ NamesDataSource EditableMapObject::GetNamesDataSource()
}
// static
NamesDataSource EditableMapObject::GetNamesDataSource(StringUtf8Multilang const & source,
vector<int8_t> const & mwmLanguages,
int8_t const userLangCode)
NamesDataSource EditableMapObject::GetNamesDataSource(StringUtf8Multilang const & source, vector<int8_t> const &,
int8_t const)
{
NamesDataSource result;
auto & names = result.names;

View file

@ -41,14 +41,8 @@ std::unique_ptr<FeatureType> FeatureSource::GetOriginalFeature(uint32_t index) c
return ft;
}
FeatureStatus FeatureSource::GetFeatureStatus(uint32_t index) const
{
return FeatureStatus::Untouched;
}
FeatureStatus FeatureSource::GetFeatureStatus(uint32_t) const { return FeatureStatus::Untouched; }
std::unique_ptr<FeatureType> FeatureSource::GetModifiedFeature(uint32_t index) const { return {}; }
std::unique_ptr<FeatureType> FeatureSource::GetModifiedFeature(uint32_t) const { return {}; }
void FeatureSource::ForEachAdditionalFeature(m2::RectD const & rect, int scale,
std::function<void(uint32_t)> const & fn) const
{
}
void FeatureSource::ForEachAdditionalFeature(m2::RectD const &, int, std::function<void(uint32_t)> const &) const {}

View file

@ -58,7 +58,7 @@ UNIT_CLASS_TEST(FeatureIdToGeoObjectIdTest, Smoke)
origM.Add(e.first, e.second);
// TestMwmBuilder will create the section but we will rewrite it right away.
auto testWorldId = BuildWorld([&](TestMwmBuilder & builder) {});
auto testWorldId = BuildWorld([&](TestMwmBuilder &) {});
auto const testWorldPath = testWorldId.GetInfo()->GetLocalFile().GetPath(MapFileType::Map);
std::vector<uint8_t> buf;

View file

@ -68,7 +68,7 @@ UNIT_TEST(FeaturesVectorTest_ParseMetadata)
FeaturesVector fv(value->m_cont, value->GetHeader(), value->m_table.get(), value->m_metaDeserializer.get());
map<string, int> actual;
fv.ForEach([&](FeatureType & ft, uint32_t index)
fv.ForEach([&](FeatureType & ft, uint32_t)
{
string const postcode(ft.GetMetadata(feature::Metadata::FMD_POSTCODE));
if (!postcode.empty())

View file

@ -71,7 +71,7 @@ public:
}
template <typename T>
std::enable_if_t<!HasCollectionMethods<T>::value> PerformActionIfPossible(T & t) {}
std::enable_if_t<!HasCollectionMethods<T>::value> PerformActionIfPossible(T &) {}
template <typename T>
std::enable_if_t<VisitedTypes<T>::value>
@ -81,7 +81,7 @@ public:
}
template <typename T>
std::enable_if_t<!VisitedTypes<T>::value> VisitIfPossible(T & t) {}
std::enable_if_t<!VisitedTypes<T>::value> VisitIfPossible(T &) {}
template <typename T>
void operator()(T & t, char const * /* name */ = nullptr)
@ -166,7 +166,7 @@ public:
}
template <typename...>
void Collect(LocalizableStringIndex & index) {}
void Collect(LocalizableStringIndex &) {}
std::vector<std::string> && StealCollection() { return std::move(m_collection); }
@ -778,7 +778,7 @@ public:
}
template <typename...>
void Collect(LocalizableStringIndex & index) {}
void Collect(LocalizableStringIndex &) {}
private:
bool SwitchSubIndexIfNeeded(LocalizableStringIndex & index)

View file

@ -58,13 +58,13 @@ void RunScenario(Framework * framework, std::shared_ptr<BenchmarkHandle> handle)
auto & scenarioData = handle->m_scenariosToRun[handle->m_currentScenario];
framework->GetDrapeEngine()->RunScenario(std::move(scenarioData),
[handle](std::string const & name)
[handle](std::string const & /* name */)
{
#ifdef DRAPE_MEASURER_BENCHMARK
df::DrapeMeasurer::Instance().Start();
#endif
},
[framework, handle](std::string const & name)
[framework, handle](std::string const & /* name */)
{
#ifdef DRAPE_MEASURER_BENCHMARK
df::DrapeMeasurer::Instance().Stop();
@ -204,6 +204,8 @@ void RunGraphicsBenchmark(Framework * framework)
// Run scenarios without downloading.
RunScenario(framework, handle);
#else
UNUSED_VALUE(framework);
#endif
}
} // namespace benchmark

View file

@ -6,6 +6,11 @@
#include <algorithm>
#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif // defined(__GNUC__) && !defined(__INTEL_COMPILER)
#include "3party/agg/agg_conv_curve.h"
#include "3party/agg/agg_conv_stroke.h"
#include "3party/agg/agg_path_storage.h"
@ -14,6 +19,10 @@
#include "3party/agg/agg_renderer_scanline.h"
#include "3party/agg/agg_scanline_p.h"
#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
#pragma GCC diagnostic pop
#endif // defined(__GNUC__) && !defined(__INTEL_COMPILER)
namespace maps
{
using namespace std;

View file

@ -821,7 +821,7 @@ UNIT_TEST(Bookmarks_Sorting)
}
};
auto const printBlocks = [](std::string const & name, BookmarkManager::SortedBlocksCollection const & blocks)
auto const printBlocks = [](std::string const & /* name */, BookmarkManager::SortedBlocksCollection const & /* blocks */)
{
// Uncomment for debug output.
/*
@ -847,7 +847,7 @@ UNIT_TEST(Bookmarks_Sorting)
params.m_hasMyPosition = hasMyPosition;
params.m_myPosition = myPosition;
params.m_onResults = [&sortedBlocks](BookmarkManager::SortedBlocksCollection && results,
BookmarkManager::SortParams::Status status)
BookmarkManager::SortParams::Status /* status */)
{
sortedBlocks = std::move(results);
};

View file

@ -98,7 +98,7 @@ UNIT_TEST(GpsTrackStorage_WriteReadWithoutTrunc)
GpsTrackStorage stg(filePath, fileMaxItemCount);
size_t i = 0;
stg.ForEach([&](location::GpsTrackInfo const & point)->bool{ ++i; return true; });
stg.ForEach([&](location::GpsTrackInfo const & /* point */)->bool{ ++i; return true; });
TEST_EQUAL(i, 0, ());
}
}
@ -182,7 +182,7 @@ UNIT_TEST(GpsTrackStorage_WriteReadWithTrunc)
GpsTrackStorage stg(filePath, fileMaxItemCount);
size_t i = 0;
stg.ForEach([&](location::GpsInfo const & point)->bool{ ++i; return true; });
stg.ForEach([&](location::GpsInfo const & /* point */)->bool{ ++i; return true; });
TEST_EQUAL(i, 0, ());
}
}

View file

@ -472,8 +472,8 @@ void RoutingManager::OnLocationUpdate(location::GpsInfo const & info)
m_extrapolator.OnLocationUpdate(info);
}
RouterType RoutingManager::GetBestRouter(m2::PointD const & startPoint,
m2::PointD const & finalPoint) const
RouterType RoutingManager::GetBestRouter(m2::PointD const & /* startPoint */,
m2::PointD const & /* finalPoint */) const
{
// todo Implement something more sophisticated here (or delete the method).
return GetLastUsedRouter();

View file

@ -50,7 +50,7 @@ public:
virtual void RunUITask(std::function<void()> /* fn */) {}
using ResultsIterT = search::Results::ConstIter;
virtual void ShowViewportSearchResults(ResultsIterT begin, ResultsIterT end, bool clear) {}
virtual void ShowViewportSearchResults(ResultsIterT /* begin */, ResultsIterT /* end */, bool /* clear */) {}
virtual void ClearViewportSearchResults() {}
@ -60,7 +60,7 @@ public:
virtual m2::PointD GetMinDistanceBetweenResults() const { return {0, 0}; }
virtual search::ProductInfo GetProductInfo(search::Result const & result) const { return {}; }
virtual search::ProductInfo GetProductInfo(search::Result const & /* result */) const { return {}; }
};
SearchAPI(DataSource & dataSource, storage::Storage const & storage,

View file

@ -33,7 +33,7 @@ public:
virtual void SetIsVisible(bool isVisible);
protected:
virtual void SetDirty(bool updateModificationDate = true) { m_isDirty = true; }
virtual void SetDirty(bool /* updateModificationDate */ = true) { m_isDirty = true; }
UserMark::Type m_type;

View file

@ -117,10 +117,8 @@ void CandidatePathsGetter::GetStartLines(vector<m2::PointD> const & points, bool
base::SortUnique(edges, less<Graph::Edge>(), EdgesAreAlmostEqual);
}
void CandidatePathsGetter::GetAllSuitablePaths(Graph::EdgeVector const & startLines,
bool isLastPoint, double bearDistM,
FunctionalRoadClass functionalRoadClass,
FormOfWay formOfWay, double distanceToNextPointM,
void CandidatePathsGetter::GetAllSuitablePaths(Graph::EdgeVector const & startLines, bool isLastPoint, double bearDistM,
FunctionalRoadClass functionalRoadClass, FormOfWay formOfWay, double,
vector<LinkPtr> & allPaths)
{
queue<LinkPtr> q;

View file

@ -155,7 +155,7 @@ string LogAs2GisPath(Graph::EdgeVector const & path)
string LogAs2GisPath(Graph::Edge const & e) { return LogAs2GisPath(Graph::EdgeVector({e})); }
bool PassesRestriction(Graph::Edge const & e, FunctionalRoadClass restriction, FormOfWay formOfWay,
bool PassesRestriction(Graph::Edge const & e, FunctionalRoadClass restriction, FormOfWay /* formOfWay */,
int frcThreshold, RoadInfoGetter & infoGetter)
{
if (e.IsFake() || restriction == FunctionalRoadClass::NotAValue)

View file

@ -222,12 +222,12 @@ bool TrafficMode::SaveSampleAs(std::string const & fileName) const
return true;
}
int TrafficMode::rowCount(const QModelIndex & parent) const
int TrafficMode::rowCount(const QModelIndex & /* parent */) const
{
return static_cast<int>(m_segments.size());
}
int TrafficMode::columnCount(const QModelIndex & parent) const { return 4; }
int TrafficMode::columnCount(const QModelIndex & /* parent */) const { return 4; }
QVariant TrafficMode::data(const QModelIndex & index, int role) const
{

View file

@ -16,8 +16,8 @@ ComboBoxDelegate::ComboBoxDelegate(QObject * parent)
{
}
QWidget * ComboBoxDelegate::createEditor(QWidget * parent, QStyleOptionViewItem const & option,
QModelIndex const & index) const
QWidget * ComboBoxDelegate::createEditor(QWidget * parent, QStyleOptionViewItem const & /* option */,
QModelIndex const & /* index */) const
{
auto * editor = new QComboBox(parent);
editor->setFrame(false);
@ -40,7 +40,7 @@ void ComboBoxDelegate::setModelData(QWidget * editor, QAbstractItemModel * model
}
void ComboBoxDelegate::updateEditorGeometry(QWidget * editor, QStyleOptionViewItem const & option,
QModelIndex const & index) const
QModelIndex const & /* index */) const
{
editor->setGeometry(option.rect);
}

View file

@ -150,7 +150,7 @@ void WithRoad(vector<m2::PointD> const & points, Func && fn)
UNIT_TEST(MakePath_Test)
{
std::vector<m2::PointD> const points{{0, 0}, {0, 1}, {1, 0}, {1, 1}};
WithRoad(points, [&points](DataSource const & dataSource, FeatureType & road) {
WithRoad(points, [&points](DataSource const &, FeatureType & road) {
auto const & id = road.GetID();
{
openlr::Path const expected{

View file

@ -222,8 +222,7 @@ void ScoreCandidatePathsGetter::GetAllSuitablePaths(ScoreEdgeVec const & startLi
void ScoreCandidatePathsGetter::GetBestCandidatePaths(vector<shared_ptr<Link>> const & allPaths,
LinearSegmentSource source, bool isLastPoint,
uint32_t requiredBearing, double bearDistM,
m2::PointD const & startPoint,
uint32_t requiredBearing, double bearDistM, m2::PointD const &,
ScorePathVec & candidates)
{
CHECK_NOT_EQUAL(source, LinearSegmentSource::NotValid, ());

View file

@ -181,7 +181,7 @@ bool HttpClient::RunHttpRequest()
if (m_loadHeaders)
{
[response.allHeaderFields enumerateKeysAndObjectsUsingBlock:^(NSString * key, NSString * obj, BOOL * stop)
[response.allHeaderFields enumerateKeysAndObjectsUsingBlock:^(NSString * key, NSString * obj, BOOL *)
{
m_headers.emplace(key.lowercaseString.UTF8String, obj.UTF8String);
}];

View file

@ -53,7 +53,7 @@
- (NSData *)requestDataWithBoundary:(NSString *)boundary {
NSMutableData * data = [NSMutableData data];
[self.params enumerateKeysAndObjectsUsingBlock:^(NSString * key, NSString * value, BOOL * stop) {
[self.params enumerateKeysAndObjectsUsingBlock:^(NSString * key, NSString * value, BOOL *) {
[data appendData:[[NSString stringWithFormat:@"--%@\r\n", boundary]
dataUsingEncoding:NSUTF8StringEncoding]];
[data appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"\r\n\r\n",
@ -92,7 +92,7 @@
NSString * contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", boundary];
[uploadRequest setValue:contentType forHTTPHeaderField:@"Content-Type"];
[self.headers enumerateKeysAndObjectsUsingBlock:^(NSString * key, NSString * value, BOOL * stop) {
[self.headers enumerateKeysAndObjectsUsingBlock:^(NSString * key, NSString * value, BOOL *) {
[uploadRequest setValue:value forHTTPHeaderField:key];
}];

View file

@ -180,7 +180,7 @@ uint8_t Platform::GetBatteryLevel()
return 100;
}
void Platform::GetSystemFontNames(FilesList & res) const
void Platform::GetSystemFontNames(FilesList &) const
{
}

View file

@ -14,7 +14,7 @@ namespace tests_support
{
TestSocket::~TestSocket() { m_isConnected = false; }
bool TestSocket::Open(string const & host, uint16_t port)
bool TestSocket::Open(string const &, uint16_t)
{
if (m_isConnected)
return false;

View file

@ -185,7 +185,7 @@ df::Touch MapWidget::GetSymmetrical(df::Touch const & touch) const
return result;
}
void MapWidget::OnViewportChanged(ScreenBase const & screen)
void MapWidget::OnViewportChanged(ScreenBase const &)
{
UpdateScaleControl();
}

View file

@ -22,7 +22,7 @@ public:
{}
protected:
void paintEvent(QPaintEvent * e) override
void paintEvent(QPaintEvent *) override
{
m_fn(this);
}

View file

@ -23,49 +23,45 @@ class DummyWorldGraph final : public WorldGraph
public:
using WorldGraph::GetEdgeList;
void GetEdgeList(astar::VertexData<Segment, RouteWeight> const & vertexData, bool isOutgoing,
bool useRoutingOptions, bool useAccessConditional,
SegmentEdgeListT & edges) override
void GetEdgeList(astar::VertexData<Segment, RouteWeight> const &, bool, bool, bool, SegmentEdgeListT &) override
{
UNREACHABLE();
}
void GetEdgeList(astar::VertexData<JointSegment, RouteWeight> const & vertexData,
Segment const & segment, bool isOutgoing, bool useAccessConditional,
JointEdgeListT & edges,
WeightListT & parentWeights) override
void GetEdgeList(astar::VertexData<JointSegment, RouteWeight> const &, Segment const &, bool, bool, JointEdgeListT &,
WeightListT &) override
{
UNREACHABLE();
}
bool CheckLength(RouteWeight const & weight, double startToFinishDistanceM) const override
bool CheckLength(RouteWeight const &, double) const override
{
return true;
}
LatLonWithAltitude const & GetJunction(Segment const & segment, bool front) override
LatLonWithAltitude const & GetJunction(Segment const &, bool) override
{
UNREACHABLE();
}
ms::LatLon const & GetPoint(Segment const & segment, bool front) override
ms::LatLon const & GetPoint(Segment const &, bool) override
{
UNREACHABLE();
}
bool IsOneWay(NumMwmId mwmId, uint32_t featureId) override
bool IsOneWay(NumMwmId, uint32_t) override
{
UNREACHABLE();
}
bool IsPassThroughAllowed(NumMwmId mwmId, uint32_t featureId) override
bool IsPassThroughAllowed(NumMwmId, uint32_t) override
{
UNREACHABLE();
}
void ClearCachedGraphs() override { UNREACHABLE(); }
void SetMode(WorldGraphMode mode) override {}
void SetMode(WorldGraphMode) override {}
WorldGraphMode GetMode() const override { return WorldGraphMode::NoLeaps; }
@ -74,41 +70,36 @@ public:
return RouteWeight(ms::DistanceOnEarth(from, to));
}
RouteWeight CalcSegmentWeight(Segment const & segment, EdgeEstimator::Purpose purpose) override
RouteWeight CalcSegmentWeight(Segment const &, EdgeEstimator::Purpose) override
{
UNREACHABLE();
}
RouteWeight CalcLeapWeight(ms::LatLon const & from, ms::LatLon const & to,
NumMwmId mwmId) const override
{
RouteWeight CalcLeapWeight(ms::LatLon const &, ms::LatLon const &, NumMwmId) const override {
UNREACHABLE();
}
RouteWeight CalcOffroadWeight(ms::LatLon const & from, ms::LatLon const & to,
EdgeEstimator::Purpose purpose) const override
RouteWeight CalcOffroadWeight(ms::LatLon const & from, ms::LatLon const & to, EdgeEstimator::Purpose) const override
{
return RouteWeight(ms::DistanceOnEarth(from, to));
}
double CalculateETA(Segment const & from, Segment const & to) override
double CalculateETA(Segment const &, Segment const &) override
{
UNREACHABLE();
}
double CalculateETAWithoutPenalty(Segment const & segment) override
double CalculateETAWithoutPenalty(Segment const &) override
{
UNREACHABLE();
}
IndexGraph & GetIndexGraph(NumMwmId numMwmId) override
IndexGraph & GetIndexGraph(NumMwmId) override
{
UNREACHABLE();
}
void GetTwinsInner(Segment const & segment, bool isOutgoing,
std::vector<Segment> & twins) override
{
void GetTwinsInner(Segment const &, bool, std::vector<Segment> &) override {
CHECK(false, ());
}
};

View file

@ -124,7 +124,7 @@ double GetPedestrianClimbPenalty(EdgeEstimator::Purpose purpose, double tangent,
}
}
double GetBicycleClimbPenalty(EdgeEstimator::Purpose purpose, double tangent, geometry::Altitude altitudeM)
double GetBicycleClimbPenalty(EdgeEstimator::Purpose, double tangent, geometry::Altitude altitudeM)
{
double constexpr kMinPenalty = 1.0;
double const impact = tangent >= 0.0 ? 1.0 : 0.35;

View file

@ -101,7 +101,7 @@ public:
protected:
MwmDataSource & m_dataSource;
virtual feature::AltitudeLoaderBase * GetAltitudesLoader(MwmSet::MwmId const & mwmId) const
virtual feature::AltitudeLoaderBase * GetAltitudesLoader(MwmSet::MwmId const &) const
{
// Don't retrieve altitudes here because FeaturesRoadGraphBase is used in IndexRouter for
// IndexRouter::FindClosestProjectionToRoad and IndexRouter::FindBestEdges only.

View file

@ -294,7 +294,7 @@ RoadGeometry const & Geometry::GetRoad(uint32_t featureId)
return m_featureIdToRoad->GetValue(featureId);
}
SpeedInUnits GeometryLoader::GetSavedMaxspeed(uint32_t featureId, bool forward)
SpeedInUnits GeometryLoader::GetSavedMaxspeed(uint32_t, bool)
{
UNREACHABLE();
}

View file

@ -160,10 +160,9 @@ void IndexGraph::GetEdgeList(JointSegment const & parentJoint, Segment const & p
parentWeights, parents);
}
void IndexGraph::GetEdgeListImpl(
astar::VertexData<JointSegment, RouteWeight> const & parentVertexData, Segment const & parent,
bool isOutgoing, bool useAccessConditional, JointEdgeListT & edges,
WeightListT & parentWeights, Parents<JointSegment> const & parents) const
void IndexGraph::GetEdgeListImpl(astar::VertexData<JointSegment, RouteWeight> const & parentVertexData,
Segment const & parent, bool isOutgoing, bool, JointEdgeListT & edges,
WeightListT & parentWeights, Parents<JointSegment> const & parents) const
{
SegmentListT possibleChildren;
GetSegmentCandidateForJoint(parent, isOutgoing, possibleChildren);

View file

@ -8,9 +8,9 @@ uint32_t constexpr IndexGraphSerializer::JointsFilter::kEmptyEntry;
uint32_t constexpr IndexGraphSerializer::JointsFilter::kPushedEntry;
// IndexGraphSerializer::SectionSerializer ---------------------------------------------------------
void IndexGraphSerializer::SectionSerializer::PreSerialize(
IndexGraph const & graph, std::unordered_map<uint32_t, VehicleMask> const & masks,
JointIdEncoder & jointEncoder)
void IndexGraphSerializer::SectionSerializer::PreSerialize(IndexGraph const & graph,
std::unordered_map<uint32_t, VehicleMask> const &,
JointIdEncoder & jointEncoder)
{
m_buffer.clear();
MemWriter<std::vector<uint8_t>> memWriter(m_buffer);

View file

@ -69,8 +69,7 @@ void IndexRoadGraph::GetEdgeTypes(Edge const & edge, feature::TypesHolder & type
types = feature::TypesHolder(*ft);
}
void IndexRoadGraph::GetJunctionTypes(geometry::PointWithAltitude const & junction,
feature::TypesHolder & types) const
void IndexRoadGraph::GetJunctionTypes(geometry::PointWithAltitude const &, feature::TypesHolder & types) const
{
types = feature::TypesHolder();
}

View file

@ -10,8 +10,7 @@ namespace routing
#ifdef DEBUG
// Leaps algorithm.
void DebugRoutingState(Segment const & vertex, std::optional<Segment> const & parent,
RouteWeight const & heuristic, RouteWeight const & distance)
void DebugRoutingState(Segment const &, std::optional<Segment> const &, RouteWeight const &, RouteWeight const &)
{
// 1. Dump current processing vertex.
// std::cout << DebugPrint(vertex);
@ -24,8 +23,8 @@ void DebugRoutingState(Segment const & vertex, std::optional<Segment> const & pa
}
// Joints algorithm.
void DebugRoutingState(JointSegment const & vertex, std::optional<JointSegment> const & parent,
RouteWeight const & heuristic, RouteWeight const & distance)
void DebugRoutingState(JointSegment const &, std::optional<JointSegment> const &, RouteWeight const &,
RouteWeight const &)
{
// 1. Dump current processing vertex.
// std::cout << DebugPrint(vertex);

View file

@ -14,7 +14,7 @@ namespace
std::string const kNames[] = {"No", "Private", "Destination", "Yes", "Count"};
template <typename KV>
std::string DebugPrintKV(KV const & kvs, size_t maxKVToShow)
std::string DebugPrintKV(KV const & kvs, size_t /* maxKVToShow */)
{
// Print all range for now.
return DebugPrintSequence(kvs.begin(), kvs.end());

View file

@ -319,7 +319,7 @@ IRoadGraph::RoadInfo MakeRoadInfoForTesting(bool bidirectional, double speedKMPH
}
// RoadGraphBase ------------------------------------------------------------------
void RoadGraphBase::GetRouteEdges(EdgeVector & routeEdges) const
void RoadGraphBase::GetRouteEdges(EdgeVector &) const
{
NOTIMPLEMENTED();
}

View file

@ -121,7 +121,7 @@ void RoutingTest::TestTwoPointsOnFeature(m2::PointD const & startPos, m2::PointD
TestRouters(startPosOnFeature, finalPosOnFeature);
}
std::unique_ptr<routing::IRouter> RoutingTest::CreateRouter(std::string const & name)
std::unique_ptr<routing::IRouter> RoutingTest::CreateRouter(std::string const &)
{
std::vector<platform::LocalCountryFile> neededLocalFiles;
neededLocalFiles.reserve(m_neededMaps.size());

View file

@ -133,7 +133,7 @@ RoutingApi::RoutingApi(std::string name, std::string token, uint32_t maxRPS)
, m_accessToken(std::move(token))
, m_maxRPS(maxRPS) {}
Response RoutingApi::CalculateRoute(Params const & params, int32_t startTimeZoneUTC) const
Response RoutingApi::CalculateRoute(Params const &, int32_t) const
{
return {};
}

View file

@ -36,9 +36,8 @@ public:
// IRouter overrides:
string GetName() const override { return "Dummy"; }
void SetGuides(GuidesTracks && /* guides */) override {}
RouterResultCode CalculateRoute(Checkpoints const & checkpoints, m2::PointD const & startDirection,
bool adjustToPrevRoute, RouterDelegate const & delegate,
Route & route) override
RouterResultCode CalculateRoute(Checkpoints const & checkpoints, m2::PointD const &, bool, RouterDelegate const &,
Route & route) override
{
route = Route("dummy", checkpoints.GetPoints().cbegin(), checkpoints.GetPoints().cend(),
0 /* route id */);
@ -49,8 +48,7 @@ public:
return m_result;
}
bool FindClosestProjectionToRoad(m2::PointD const & point, m2::PointD const & direction,
double radius, EdgeProj & proj) override
bool FindClosestProjectionToRoad(m2::PointD const &, m2::PointD const &, double, EdgeProj &) override
{
return false;
}
@ -77,7 +75,7 @@ struct DummyRoutingCallbacks
}
// NeedMoreMapsCallback callback
void operator()(uint64_t routeId, set<string> const & absent)
void operator()(uint64_t /* routeId */, set<string> const & absent)
{
m_codes.push_back(RouterResultCode::NeedMoreMaps);
m_absent.emplace_back(absent);

View file

@ -164,7 +164,7 @@ UNIT_TEST(BFS_ReconstructPathTest)
DirectedGraph graph = BuildSmallDirectedCyclicGraph();
BFS<DirectedGraph> bfs(graph);
bfs.Run(0 /* start */, true /* isOutgoing */, [&](auto const & state) { return true; });
bfs.Run(0 /* start */, true /* isOutgoing */, [&](auto const &) { return true; });
std::vector<uint32_t> path = bfs.ReconstructPath(2, false /* reverse */);
std::vector<uint32_t> expected = {0, 1, 2};

View file

@ -145,8 +145,8 @@ double WeightedEdgeEstimator::CalcSegmentWeight(Segment const & segment,
return it->second;
}
double WeightedEdgeEstimator::GetUTurnPenalty(Purpose purpose) const { return 0.0; }
double WeightedEdgeEstimator::GetFerryLandingPenalty(Purpose purpose) const { return 0.0; }
double WeightedEdgeEstimator::GetUTurnPenalty(Purpose) const { return 0.0; }
double WeightedEdgeEstimator::GetFerryLandingPenalty(Purpose) const { return 0.0; }
// TestIndexGraphTopology --------------------------------------------------------------------------
TestIndexGraphTopology::TestIndexGraphTopology(uint32_t numVertices) : m_numVertices(numVertices) {}

Some files were not shown because too many files have changed in this diff Show more