Skip to content

Commit

Permalink
[core] Fix minor warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Konstantin Pastbin <[email protected]>
  • Loading branch information
pastk authored and biodranik committed Sep 15, 2023
1 parent ea37cc3 commit 3d2b998
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion base/non_intersecting_intervals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ bool NonIntersectingIntervals<T>::Interval::LessByLeftEnd::operator()(Interval c
Interval const & rhs) const
{
return lhs.m_left < rhs.m_left;
};
}

template <typename T>
bool NonIntersectingIntervals<T>::Interval::Intersects(Interval const & rhs) const
Expand Down
2 changes: 1 addition & 1 deletion drape/oglcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ void OGLContext::SetDepthTestEnabled(bool enabled)
void OGLContext::SetDepthTestFunction(TestFunction depthFunction)
{
GLFunctions::glDepthFunc(DecodeTestFunction(depthFunction));
};
}

void OGLContext::SetStencilTestEnabled(bool enabled)
{
Expand Down
10 changes: 10 additions & 0 deletions drape_frontend/gui/skin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ dp::Anchor ParseValueAnchor(std::string_view value)
if (value == "bottom")
return dp::Bottom;
else
{
ASSERT(false, ());
}

return dp::Center;
}
Expand Down Expand Up @@ -94,7 +96,9 @@ class ResolverParser
else if (m_element == Element::Relative)
m_resolver.AddRelative(ParseValueAnchor(value));
else
{
ASSERT(false, ());
}
}
}

Expand Down Expand Up @@ -140,14 +144,18 @@ class SkinLoader
else if (element == "copyright")
m_currentElement = WIDGET_COPYRIGHT;
else
{
ASSERT(false, ());
}
}
else if (!m_inConfiguration)
{
if (element == "portrait" || element == "landscape")
m_inConfiguration = true;
else
{
ASSERT(false, ());
}
}
else
{
Expand All @@ -158,7 +166,9 @@ class SkinLoader
else if (element == "offset")
m_parser.SetElement(ResolverParser::Element::Offset);
else
{
ASSERT(false, ());
}
}

return true;
Expand Down
2 changes: 2 additions & 0 deletions drape_frontend/line_shape_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ void ConstructLineSegments(std::vector<m2::PointD> const & path, std::vector<gls
ASSERT_LESS(1, path.size(), ());

if (!segmentsColors.empty())
{
ASSERT_EQUAL(segmentsColors.size() + 1, path.size(), ());
}

m2::PointD prevPoint = path[0];
for (size_t i = 1; i < path.size(); ++i)
Expand Down
4 changes: 2 additions & 2 deletions generator/restriction_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ std::vector<RelationElement::Member> GetMembersByTag(RelationElement const & rel
}

return result;
};
}

OsmElement::EntityType GetType(RelationElement const & relationElement, uint64_t osmId)
{
Expand All @@ -88,7 +88,7 @@ OsmElement::EntityType GetType(RelationElement const & relationElement, uint64_t
}

UNREACHABLE();
};
}

std::string const RestrictionWriter::kNodeString = "node";
std::string const RestrictionWriter::kWayString = "way";
Expand Down
2 changes: 1 addition & 1 deletion geometry/rect2d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ bool HasIntersection(m2::Rect<T> const & rect, TCollection const & geometry)
return true;
}
return false;
};
}

template <class TArchive, class PointT>
TArchive & operator>>(TArchive & ar, m2::Rect<PointT> & rect)
Expand Down
4 changes: 4 additions & 0 deletions indexer/feature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,9 @@ void FeatureType::ParseHeader2()
if (elemsCount == 0)
geomScalesMask = bitSource.Read(4);
else
{
ASSERT(headerGeomType == HeaderGeomType::Area || elemsCount > 1, ());
}
}

ArrayByteSource src(bitSource.RoundPtr());
Expand Down Expand Up @@ -833,7 +835,9 @@ string_view FeatureType::GetName(int8_t lang)
// We don't store empty names. UPD: We do for coast features :)
string_view name;
if (m_params.name.GetString(lang, name))
{
ASSERT(!name.empty() || m_id.m_mwmId.GetInfo()->GetType() == MwmInfo::COASTS, ());
}

return name;
}
Expand Down
2 changes: 1 addition & 1 deletion map/routing_mark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ drape_ptr<df::UserPointMark::SymbolNameZoomInfo> TransitMark::GetSymbolNames() c
if (m_symbolNames.empty())
return nullptr;
return make_unique_dp<SymbolNameZoomInfo>(m_symbolNames);
};
}

// static
void TransitMark::GetDefaultTransitTitle(dp::TitleDecl & titleDecl)
Expand Down
2 changes: 1 addition & 1 deletion platform/qt_location_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static location::TLocationSource qStringToTLocationSource(QString const & source

return location::TLocationSource::EUndefined;
}
};
}


QtLocationService::QtLocationService(location::LocationObserver & observer, std::string const & sourceName) : LocationService(observer)
Expand Down
2 changes: 1 addition & 1 deletion routing_common/vehicle_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ template <double const & (*F)(double const &, double const &), typename WeightAn
WeightAndETA Pick(WeightAndETA const & lhs, WeightAndETA const & rhs)
{
return {F(lhs.m_weight, rhs.m_weight), F(lhs.m_eta, rhs.m_eta)};
};
}

SpeedKMpH Max(SpeedKMpH const & lhs, InOutCitySpeedKMpH const & rhs)
{
Expand Down
2 changes: 1 addition & 1 deletion transit/experimental/transit_types_experimental.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ bool Gate::IsValid() const
void Gate::SetBestPedestrianSegments(std::vector<SingleMwmSegment> const & seg)
{
m_bestPedestrianSegments = seg;
};
}

FeatureId Gate::GetFeatureId() const { return m_ids.GetFeatureId(); }

Expand Down

0 comments on commit 3d2b998

Please sign in to comment.