diff options
author | Alex Zolotarev <alex@maps.me> | 2015-04-09 15:10:04 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:45:42 +0300 |
commit | b2a5d98f273574773e280386304da0b1f41e46a9 (patch) | |
tree | 2fe42dc537a3979d341213cafb8504e9664482ba /indexer | |
parent | 54575aee00ae2e23f413a7f3797570532e1fed9d (diff) |
Singletone IsBuildingChecker.
Diffstat (limited to 'indexer')
-rw-r--r-- | indexer/ftypes_matcher.cpp | 6 | ||||
-rw-r--r-- | indexer/ftypes_matcher.hpp | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/indexer/ftypes_matcher.cpp b/indexer/ftypes_matcher.cpp index 86040f3352..704a02780b 100644 --- a/indexer/ftypes_matcher.cpp +++ b/indexer/ftypes_matcher.cpp @@ -160,6 +160,12 @@ IsBuildingChecker::IsBuildingChecker() m_types.push_back(c.GetTypeByPath({ "building", "address" })); } +IsBuildingChecker const & IsBuildingChecker::Instance() +{ + static const IsBuildingChecker inst; + return inst; +} + IsLocalityChecker::IsLocalityChecker() { Classificator const & c = classif(); diff --git a/indexer/ftypes_matcher.hpp b/indexer/ftypes_matcher.hpp index 9ed2044cae..df194d3b46 100644 --- a/indexer/ftypes_matcher.hpp +++ b/indexer/ftypes_matcher.hpp @@ -80,16 +80,16 @@ public: class IsLinkChecker : public BaseChecker { -public: IsLinkChecker(); +public: static IsLinkChecker const & Instance(); }; class IsBuildingChecker : public BaseChecker { -public: IsBuildingChecker(); - +public: + static IsBuildingChecker const & Instance(); uint32_t GetMainType() const { return m_types[0]; } }; |