diff options
author | vng <viktor.govako@gmail.com> | 2012-10-04 23:16:01 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:44:37 +0300 |
commit | 1f008f1b0e3bf6a6510cbc0dd5033e7249a4cabd (patch) | |
tree | d3642d6dc1b4a4cb7e1a7576eb344a6c239ba191 /indexer/feature_data.cpp | |
parent | 3c802db64e08cf380829c38328c4cef5dea3ccb0 (diff) |
Fixed bug with very long house number (Try Colombia for example).
Diffstat (limited to 'indexer/feature_data.cpp')
-rw-r--r-- | indexer/feature_data.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/indexer/feature_data.cpp b/indexer/feature_data.cpp index 12af305b66..6decfe5e83 100644 --- a/indexer/feature_data.cpp +++ b/indexer/feature_data.cpp @@ -71,8 +71,15 @@ void FeatureParamsBase::AddHouseName(string const & s) house.Set(house.IsEmpty() ? s : house.Get() + " \"" + s + "\""); } -void FeatureParamsBase::AddHouseNumber(string const & s) +void FeatureParamsBase::AddHouseNumber(string const & ss) { + // Remove trailing zero's from house numbers. + // It's important for debug checks of serialized-deserialized feature. + string s(ss); + uint64_t n; + if (strings::to_uint64(s, n)) + s = strings::to_string(n); + house.Set(house.IsEmpty() ? s : s + " \"" + house.Get() + "\""); } |