Skip to content

Commit 6e06daf

Browse files
TheMarexkarenzshea
authored andcommitted
Remove code for checking the .core file, since we do not create it anymore
1 parent 2b6bdaf commit 6e06daf

File tree

4 files changed

+4
-64
lines changed

4 files changed

+4
-64
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# 5.14.2
2-
- Changes from 5.14.1
2+
- Changes from 5.14.1:
3+
- Bugfixes:
4+
- FIXED #4727: Erroring when a old .core file is present.
35

46
# 5.14.1
57
- Changes from 5.14.0

include/storage/shared_datatype.hpp

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,6 @@ const constexpr char *block_id_to_name[] = {"NAME_CHAR_DATA",
4848
"HSGR_CHECKSUM",
4949
"TIMESTAMP",
5050
"FILE_INDEX_PATH",
51-
"CH_CORE_MARKER_0",
52-
"CH_CORE_MARKER_1",
53-
"CH_CORE_MARKER_2",
54-
"CH_CORE_MARKER_3",
55-
"CH_CORE_MARKER_4",
56-
"CH_CORE_MARKER_5",
57-
"CH_CORE_MARKER_6",
58-
"CH_CORE_MARKER_7",
5951
"DATASOURCES_NAMES",
6052
"PROPERTIES",
6153
"BEARING_CLASSID",
@@ -132,14 +124,6 @@ struct DataLayout
132124
HSGR_CHECKSUM,
133125
TIMESTAMP,
134126
FILE_INDEX_PATH,
135-
CH_CORE_MARKER_0,
136-
CH_CORE_MARKER_1,
137-
CH_CORE_MARKER_2,
138-
CH_CORE_MARKER_3,
139-
CH_CORE_MARKER_4,
140-
CH_CORE_MARKER_5,
141-
CH_CORE_MARKER_6,
142-
CH_CORE_MARKER_7,
143127
DATASOURCES_NAMES,
144128
PROPERTIES,
145129
BEARING_CLASSID,
@@ -200,15 +184,7 @@ struct DataLayout
200184

201185
inline uint64_t GetBlockEntries(BlockID bid) const { return num_entries[bid]; }
202186

203-
inline uint64_t GetBlockSize(BlockID bid) const
204-
{
205-
// special bit encoding
206-
if (bid >= CH_CORE_MARKER_0 && bid <= CH_CORE_MARKER_7)
207-
{
208-
return (num_entries[bid] / 32 + 1) * entry_size[bid];
209-
}
210-
return num_entries[bid] * entry_size[bid];
211-
}
187+
inline uint64_t GetBlockSize(BlockID bid) const { return num_entries[bid] * entry_size[bid]; }
212188

213189
inline uint64_t GetSizeOfLayout() const
214190
{

include/storage/storage_config.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ struct StorageConfig final : IOConfig
6464
{".osrm.hsgr",
6565
".osrm.nbg_nodes",
6666
".osrm.ebg_nodes",
67-
".osrm.core",
6867
".osrm.cells",
6968
".osrm.cell_metrics",
7069
".osrm.mldgr",

src/storage/storage.cpp

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -331,43 +331,6 @@ void Storage::PopulateLayout(DataLayout &layout)
331331
layout.SetBlockSize<char>(DataLayout::TIMESTAMP, timestamp_size);
332332
}
333333

334-
// load core marker size
335-
if (boost::filesystem::exists(config.GetPath(".osrm.core")))
336-
{
337-
io::FileReader core_marker_file(config.GetPath(".osrm.core"),
338-
io::FileReader::VerifyFingerprint);
339-
const auto num_metrics = core_marker_file.ReadElementCount64();
340-
if (num_metrics > NUM_METRICS)
341-
{
342-
throw util::exception("Only " + std::to_string(NUM_METRICS) +
343-
" metrics are supported at the same time.");
344-
}
345-
346-
const auto number_of_core_markers = core_marker_file.ReadElementCount64();
347-
for (const auto index : util::irange<std::size_t>(0, num_metrics))
348-
{
349-
layout.SetBlockSize<unsigned>(
350-
static_cast<DataLayout::BlockID>(DataLayout::CH_CORE_MARKER_0 + index),
351-
number_of_core_markers);
352-
}
353-
for (const auto index : util::irange<std::size_t>(num_metrics, NUM_METRICS))
354-
{
355-
layout.SetBlockSize<unsigned>(
356-
static_cast<DataLayout::BlockID>(DataLayout::CH_CORE_MARKER_0 + index), 0);
357-
}
358-
}
359-
else
360-
{
361-
layout.SetBlockSize<unsigned>(DataLayout::CH_CORE_MARKER_0, 0);
362-
layout.SetBlockSize<unsigned>(DataLayout::CH_CORE_MARKER_1, 0);
363-
layout.SetBlockSize<unsigned>(DataLayout::CH_CORE_MARKER_2, 0);
364-
layout.SetBlockSize<unsigned>(DataLayout::CH_CORE_MARKER_3, 0);
365-
layout.SetBlockSize<unsigned>(DataLayout::CH_CORE_MARKER_4, 0);
366-
layout.SetBlockSize<unsigned>(DataLayout::CH_CORE_MARKER_5, 0);
367-
layout.SetBlockSize<unsigned>(DataLayout::CH_CORE_MARKER_6, 0);
368-
layout.SetBlockSize<unsigned>(DataLayout::CH_CORE_MARKER_7, 0);
369-
}
370-
371334
// load turn weight penalties
372335
{
373336
io::FileReader turn_weight_penalties_file(config.GetPath(".osrm.turn_weight_penalties"),

0 commit comments

Comments
 (0)