Skip to content

Commit 0ca9131

Browse files
authored
Added block_counter variable to a preprocessor check, minor bug. (#6596)
1 parent 134da91 commit 0ca9131

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- FIXED: Typo in file name src/util/timed_historgram.cpp -> src/util/timed_histogram.cpp [#6428](https://github.com/Project-OSRM/osrm-backend/issues/6428)
2323
- CHANGED: Replace boost::string_ref with std::string_view [#6433](https://github.com/Project-OSRM/osrm-backend/pull/6433)
2424
- ADDED: Print tracebacks for Lua runtime errors [#6564](https://github.com/Project-OSRM/osrm-backend/pull/6564)
25+
- FIXED: Added a variable to preprocessor guard in file osrm-backend/include/util/range_table.hpp to solve build error. [#6596](https://github.com/Project-OSRM/osrm-backend/pull/6596)
2526
- Routing:
2627
- FIXED: Fix adding traffic signal penalties during compression [#6419](https://github.com/Project-OSRM/osrm-backend/pull/6419)
2728
# 5.27.1

include/util/range_table.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ template <unsigned BLOCK_SIZE, storage::Ownership Ownership> class RangeTable
7979
unsigned last_length = 0;
8080
unsigned lengths_prefix_sum = 0;
8181
unsigned block_idx = 0;
82-
unsigned block_counter = 0;
8382
BlockT block;
8483
#ifndef BOOST_ASSERT_IS_VOID
8584
unsigned block_sum = 0;
85+
unsigned block_counter = 0;
8686
#endif
8787
for (const unsigned l : lengths)
8888
{
@@ -109,7 +109,9 @@ template <unsigned BLOCK_SIZE, storage::Ownership Ownership> class RangeTable
109109
if (BLOCK_SIZE == block_idx)
110110
{
111111
diff_blocks.push_back(block);
112+
#ifndef BOOST_ASSERT_IS_VOID
112113
block_counter++;
114+
#endif
113115
}
114116

115117
// we can only store strings with length 255

0 commit comments

Comments
 (0)