Skip to content

Commit f6b313e

Browse files
author
Denis Chapligin
authored
Merge pull request #5836 from fofanov/mbell/remove_future
Remove unused future
2 parents 523d9e9 + d3ab6f1 commit f6b313e

File tree

1 file changed

+6
-36
lines changed

1 file changed

+6
-36
lines changed

src/extractor/extractor.cpp

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "extractor/extractor.hpp"
22

3+
#include "extractor/compressed_edge_container.hpp"
34
#include "extractor/compressed_node_based_graph_edge.hpp"
45
#include "extractor/edge_based_edge.hpp"
56
#include "extractor/extraction_containers.hpp"
@@ -11,47 +12,34 @@
1112
#include "extractor/maneuver_override_relation_parser.hpp"
1213
#include "extractor/name_table.hpp"
1314
#include "extractor/node_based_graph_factory.hpp"
14-
#include "extractor/raster_source.hpp"
1515
#include "extractor/restriction_filter.hpp"
16+
#include "extractor/restriction_index.hpp"
1617
#include "extractor/restriction_parser.hpp"
1718
#include "extractor/scripting_environment.hpp"
19+
#include "extractor/tarjan_scc.hpp"
20+
#include "extractor/way_restriction_map.hpp"
1821

1922
#include "guidance/files.hpp"
2023
#include "guidance/guidance_processing.hpp"
2124
#include "guidance/segregated_intersection_classification.hpp"
2225
#include "guidance/turn_data_container.hpp"
2326

24-
#include "storage/io.hpp"
25-
2627
#include "util/exception.hpp"
2728
#include "util/exception_utils.hpp"
2829
#include "util/integer_range.hpp"
2930
#include "util/log.hpp"
30-
#include "util/range_table.hpp"
31-
#include "util/timing_util.hpp"
32-
33-
#include "extractor/compressed_edge_container.hpp"
34-
#include "extractor/restriction_index.hpp"
35-
#include "extractor/way_restriction_map.hpp"
3631
#include "util/static_graph.hpp"
3732
#include "util/static_rtree.hpp"
33+
#include "util/timing_util.hpp"
3834

3935
// Keep debug include to make sure the debug header is in sync with types.
4036
#include "util/debug.hpp"
4137

42-
#include "extractor/tarjan_scc.hpp"
43-
4438
#include <boost/assert.hpp>
45-
#include <boost/filesystem.hpp>
46-
#include <boost/filesystem/fstream.hpp>
47-
#include <boost/iterator/function_input_iterator.hpp>
48-
#include <boost/optional/optional.hpp>
49-
#include <boost/scope_exit.hpp>
5039

5140
#include <osmium/handler/node_locations_for_ways.hpp>
5241
#include <osmium/index/map/flex_mem.hpp>
5342
#include <osmium/io/any_input.hpp>
54-
#include <osmium/osm/timestamp.hpp>
5543
#include <osmium/thread/pool.hpp>
5644
#include <osmium/visitor.hpp>
5745

@@ -62,15 +50,11 @@
6250
#endif
6351
#include <tbb/pipeline.h>
6452

65-
#include <cstdlib>
66-
6753
#include <algorithm>
6854
#include <atomic>
6955
#include <bitset>
7056
#include <chrono>
71-
#include <future>
7257
#include <iostream>
73-
#include <iterator>
7458
#include <memory>
7559
#include <thread>
7660
#include <tuple>
@@ -193,7 +177,7 @@ std::vector<CompressedNodeBasedGraphEdge> toEdgeList(const util::NodeBasedDynami
193177

194178
return edges;
195179
}
196-
}
180+
} // namespace
197181

198182
/**
199183
* TODO: Refactor this function into smaller functions for better readability.
@@ -288,16 +272,6 @@ int Extractor::run(ScriptingEnvironment &scripting_environment)
288272
//
289273
// Luckily node based node ids still coincide with the coordinate array.
290274
// That's the reason we can only here write out the final compressed node based graph.
291-
292-
// Dumps to file asynchronously and makes sure we wait for its completion.
293-
std::future<void> compressed_node_based_graph_writing;
294-
295-
BOOST_SCOPE_EXIT_ALL(&)
296-
{
297-
if (compressed_node_based_graph_writing.valid())
298-
compressed_node_based_graph_writing.wait();
299-
};
300-
301275
files::writeCompressedNodeBasedGraph(config.GetPath(".osrm.cnbg").string(),
302276
toEdgeList(node_based_graph));
303277

@@ -519,7 +493,6 @@ Extractor::ParseOSMData(ScriptingEnvironment &scripting_environment,
519493
// OSM elements Lua parser
520494
tbb::filter_t<SharedBuffer, ParsedBuffer> buffer_transformer(
521495
tbb::filter::parallel, [&](const SharedBuffer buffer) {
522-
523496
ParsedBuffer parsed_buffer;
524497
parsed_buffer.buffer = buffer;
525498
scripting_environment.ProcessElements(*buffer,
@@ -540,7 +513,6 @@ Extractor::ParseOSMData(ScriptingEnvironment &scripting_environment,
540513
unsigned number_of_maneuver_overrides = 0;
541514
tbb::filter_t<ParsedBuffer, void> buffer_storage(
542515
tbb::filter::serial_in_order, [&](const ParsedBuffer &parsed_buffer) {
543-
544516
number_of_nodes += parsed_buffer.resulting_nodes.size();
545517
// put parsed objects thru extractor callbacks
546518
for (const auto &result : parsed_buffer.resulting_nodes)
@@ -564,7 +536,6 @@ Extractor::ParseOSMData(ScriptingEnvironment &scripting_environment,
564536
{
565537
extractor_callbacks->ProcessManeuverOverride(result);
566538
}
567-
568539
});
569540

570541
tbb::filter_t<SharedBuffer, std::shared_ptr<ExtractionRelationContainer>> buffer_relation_cache(
@@ -606,7 +577,6 @@ Extractor::ParseOSMData(ScriptingEnvironment &scripting_environment,
606577
tbb::filter_t<std::shared_ptr<ExtractionRelationContainer>, void> buffer_storage_relation(
607578
tbb::filter::serial_in_order,
608579
[&](const std::shared_ptr<ExtractionRelationContainer> parsed_relations) {
609-
610580
number_of_relations += parsed_relations->GetRelationsNum();
611581
relations.Merge(std::move(*parsed_relations));
612582
});

0 commit comments

Comments
 (0)