Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArsentiy Milchakov <milcars@mapswithme.com>2017-10-12 13:18:24 +0300
committerYuri Gorshenin <mipt.vi002@gmail.com>2017-10-12 15:40:58 +0300
commit1edf04cfdeede071e6fd543d036f028e5c41ad46 (patch)
tree79555dedcabd52b8841a7f6176aa09ab591b3828 /indexer/ftypes_mapping.hpp
parent9f4a64c7fdffb58d3b421e4c6e2877c87a66f1ff (diff)
[ugc] categories for place page + csv_reader fixes
Diffstat (limited to 'indexer/ftypes_mapping.hpp')
-rw-r--r--indexer/ftypes_mapping.hpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/indexer/ftypes_mapping.hpp b/indexer/ftypes_mapping.hpp
index d21553be1b..5983f8c5e8 100644
--- a/indexer/ftypes_mapping.hpp
+++ b/indexer/ftypes_mapping.hpp
@@ -11,7 +11,7 @@
namespace ftypes
{
-template <typename Container>
+template <typename Container, bool allowTransitiveDuplications = false>
class Matcher
{
public:
@@ -49,9 +49,12 @@ public:
{
{
#if defined(DEBUG)
- feature::TypesHolder holder;
- holder.Assign(classif().GetTypeByPath(type));
- ASSERT(Find(holder) == m_mapping.cend(), ("This type already exists", type));
+ if (!allowTransitiveDuplications)
+ {
+ feature::TypesHolder holder;
+ holder.Assign(classif().GetTypeByPath(type));
+ ASSERT(Find(holder) == m_mapping.cend(), ("This type already exists", type));
+ }
#endif
}
m_mapping.emplace(classif().GetTypeByPath(std::forward<Type>(type)),