forked from organicmaps/organicmaps
[booking] unused parameters are removed
This commit is contained in:
parent
5c80cf33bf
commit
3c85bb6b55
3 changed files with 9 additions and 22 deletions
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace booking
|
||||
{
|
||||
|
@ -81,8 +82,7 @@ void SetUnavailable(std::vector<FeatureID> const & filteredOut, SearchMarks & se
|
|||
}
|
||||
} // namespace
|
||||
|
||||
filter::TasksInternal MakeInternalTasks(search::Results const & results,
|
||||
filter::Tasks const & filterTasks,
|
||||
filter::TasksInternal MakeInternalTasks(filter::Tasks const & filterTasks,
|
||||
SearchMarks & searchMarks, bool inViewport)
|
||||
{
|
||||
using namespace booking::filter;
|
||||
|
@ -101,7 +101,7 @@ filter::TasksInternal MakeInternalTasks(search::Results const & results,
|
|||
ParamsInternal paramsInternal
|
||||
{
|
||||
apiParams,
|
||||
[results, &searchMarks, type, apiParams, cb, inViewport](ResultInternal<search::Results> && result)
|
||||
[&searchMarks, type, apiParams, cb, inViewport](ResultInternal<search::Results> && result)
|
||||
{
|
||||
if (type == Type::Availability)
|
||||
SetUnavailable(result.m_filteredOut, searchMarks);
|
||||
|
@ -147,16 +147,13 @@ filter::TasksInternal MakeInternalTasks(search::Results const & results,
|
|||
return tasksInternal;
|
||||
}
|
||||
|
||||
filter::TasksRawInternal MakeInternalTasks(std::vector<FeatureID> const & features,
|
||||
filter::Tasks const & filterTasks,
|
||||
filter::TasksRawInternal MakeInternalTasks(filter::Tasks const & filterTasks,
|
||||
SearchMarks & searchMarks)
|
||||
{
|
||||
using namespace booking::filter;
|
||||
|
||||
TasksRawInternal tasksInternal;
|
||||
|
||||
ASSERT(std::is_sorted(features.cbegin(), features.cend()), ());
|
||||
|
||||
for (auto const & task : filterTasks)
|
||||
{
|
||||
auto const type = task.m_type;
|
||||
|
@ -169,7 +166,7 @@ filter::TasksRawInternal MakeInternalTasks(std::vector<FeatureID> const & featur
|
|||
ParamsRawInternal paramsInternal
|
||||
{
|
||||
apiParams,
|
||||
[features, &searchMarks, type, apiParams, cb](ResultInternal<std::vector<FeatureID>> && result)
|
||||
[&searchMarks, type, apiParams, cb](ResultInternal<std::vector<FeatureID>> && result)
|
||||
{
|
||||
if (type == Type::Availability)
|
||||
SetUnavailable(result.m_filteredOut, searchMarks);
|
||||
|
@ -177,8 +174,6 @@ filter::TasksRawInternal MakeInternalTasks(std::vector<FeatureID> const & featur
|
|||
auto & sortedFeatures = result.m_passedFilter;
|
||||
auto & extras = result.m_extras;
|
||||
|
||||
ASSERT(std::is_sorted(features.cbegin(), features.cend()), ());
|
||||
|
||||
if (sortedFeatures.empty())
|
||||
return;
|
||||
|
||||
|
|
|
@ -3,24 +3,16 @@
|
|||
#include "map/booking_filter_params.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
struct FeatureID;
|
||||
|
||||
class SearchMarks;
|
||||
|
||||
namespace search
|
||||
{
|
||||
class Results;
|
||||
}
|
||||
|
||||
namespace booking
|
||||
{
|
||||
filter::TasksInternal MakeInternalTasks(search::Results const & results,
|
||||
filter::Tasks const & filterTasks,
|
||||
filter::TasksInternal MakeInternalTasks(filter::Tasks const & filterTasks,
|
||||
SearchMarks & searchMarks, bool inViewport);
|
||||
filter::TasksRawInternal MakeInternalTasks(std::vector<FeatureID> const & features,
|
||||
filter::Tasks const & filterTasks,
|
||||
filter::TasksRawInternal MakeInternalTasks(filter::Tasks const & filterTasks,
|
||||
SearchMarks & searchMarks);
|
||||
class PriceFormatter
|
||||
{
|
||||
|
|
|
@ -4266,14 +4266,14 @@ ugc::Reviews Framework::FilterUGCReviews(ugc::Reviews const & reviews) const
|
|||
void Framework::FilterResultsForHotelsQuery(booking::filter::Tasks const & filterTasks,
|
||||
search::Results const & results, bool inViewport)
|
||||
{
|
||||
auto tasksInternal = booking::MakeInternalTasks(results, filterTasks, m_searchMarks, inViewport);
|
||||
auto tasksInternal = booking::MakeInternalTasks(filterTasks, m_searchMarks, inViewport);
|
||||
m_bookingFilterProcessor.ApplyFilters(results, move(tasksInternal), filterTasks.GetMode());
|
||||
}
|
||||
|
||||
void Framework::FilterHotels(booking::filter::Tasks const & filterTasks,
|
||||
vector<FeatureID> && featureIds)
|
||||
{
|
||||
auto tasksInternal = booking::MakeInternalTasks(featureIds, filterTasks, m_searchMarks);
|
||||
auto tasksInternal = booking::MakeInternalTasks(filterTasks, m_searchMarks);
|
||||
m_bookingFilterProcessor.ApplyFilters(move(featureIds), move(tasksInternal),
|
||||
filterTasks.GetMode());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue