diff options
author | tatiana-kondakova <tatiana.kondakova@gmail.com> | 2017-11-23 17:43:21 +0300 |
---|---|---|
committer | Vladimir Byko-Ianko <bykoianko@gmail.com> | 2017-11-28 17:58:36 +0300 |
commit | 7ad4a1c83d6e7075f54cd6c581991a72baf8cee9 (patch) | |
tree | d850786e19238c17620da6c95f388b9386ec8261 /indexer/fake_feature_ids.hpp | |
parent | 5947d0bf1430ddc5099a56096d3217f20574b176 (diff) |
Use different featureIds for transit segments. Expose OsmEditor fake feature interval to avoid conflicts.
Diffstat (limited to 'indexer/fake_feature_ids.hpp')
-rw-r--r-- | indexer/fake_feature_ids.hpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/indexer/fake_feature_ids.hpp b/indexer/fake_feature_ids.hpp new file mode 100644 index 0000000000..20e65ea6f3 --- /dev/null +++ b/indexer/fake_feature_ids.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include <cstdint> +#include <limits> + +// Before creating new fake feature interval note that routing has +// it's own fake features in routing/fake_feature_ids.hpp + +namespace feature +{ +struct FakeFeatureIds +{ + static bool IsEditorCreatedFeature(uint32_t id) + { + return id >= kEditorCreatedFeaturesStart; + } + + static uint32_t constexpr k20BitsOffset = 0xfffff; + static uint32_t constexpr kEditorCreatedFeaturesStart = + std::numeric_limits<uint32_t>::max() - k20BitsOffset; +}; +} // namespace feature |