We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da33166 commit ac60afcCopy full SHA for ac60afc
include/osmium/index/relations_map.hpp
@@ -356,7 +356,8 @@ namespace osmium {
356
*/
357
void add(const osmium::unsigned_object_id_type member_id, const osmium::unsigned_object_id_type relation_id) {
358
assert(m_valid && "You can't use the RelationsMap any more after calling build_index()");
359
- if (member_id <= std::numeric_limits<uint32_t>::max() && relation_id <= std::numeric_limits<uint32_t>::max()) {
+ constexpr const osmium::unsigned_object_id_type max32 = std::numeric_limits<uint32_t>::max();
360
+ if (member_id <= max32 && relation_id <= max32) {
361
m_map32.set(member_id, relation_id);
362
} else {
363
m_map64.set(member_id, relation_id);
0 commit comments