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:
authorvng <viktor.govako@gmail.com>2012-10-04 23:16:01 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:44:37 +0300
commit1f008f1b0e3bf6a6510cbc0dd5033e7249a4cabd (patch)
treed3642d6dc1b4a4cb7e1a7576eb344a6c239ba191 /indexer
parent3c802db64e08cf380829c38328c4cef5dea3ccb0 (diff)
Fixed bug with very long house number (Try Colombia for example).
Diffstat (limited to 'indexer')
-rw-r--r--indexer/feature_data.cpp9
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() + "\"");
}