Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
30
libs/drape_frontend/custom_features_context.hpp
Normal file
30
libs/drape_frontend/custom_features_context.hpp
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#pragma once
|
||||
|
||||
#include "indexer/feature_decl.hpp"
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
namespace df
|
||||
{
|
||||
using CustomFeatures = std::map<FeatureID, bool>;
|
||||
|
||||
struct CustomFeaturesContext
|
||||
{
|
||||
CustomFeatures const m_features;
|
||||
|
||||
explicit CustomFeaturesContext(CustomFeatures && features) : m_features(std::move(features)) {}
|
||||
|
||||
bool NeedDiscardGeometry(FeatureID const & id) const
|
||||
{
|
||||
auto const it = m_features.find(id);
|
||||
if (it == m_features.cend())
|
||||
return false;
|
||||
return it->second;
|
||||
}
|
||||
};
|
||||
|
||||
using CustomFeaturesContextPtr = std::shared_ptr<CustomFeaturesContext>;
|
||||
using CustomFeaturesContextWeakPtr = std::weak_ptr<CustomFeaturesContext>;
|
||||
} // namespace df
|
||||
Loading…
Add table
Add a link
Reference in a new issue