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:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2017-05-11 14:09:40 +0300
committerr.kuznetsov <r.kuznetsov@corp.mail.ru>2017-05-19 16:41:57 +0300
commitc0099b86ce3bfe936988b17654dbd3f1698efd90 (patch)
tree6eabc95517e31ebbd7f0de8b11196691cee2ddf9 /storage
parentaa75d98f6d472ba75b37aebbae04cc74342b9be8 (diff)
Adding comment at IsEnoughSpaceForDownload() method.
Diffstat (limited to 'storage')
-rw-r--r--storage/storage_helpers.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/storage_helpers.cpp b/storage/storage_helpers.cpp
index a636902b67..4ee47f5c52 100644
--- a/storage/storage_helpers.cpp
+++ b/storage/storage_helpers.cpp
@@ -33,6 +33,9 @@ bool IsEnoughSpaceForDownload(TCountryId const & countryId, Storage const & stor
{
NodeAttrs nodeAttrs;
storage.GetNodeAttrs(countryId, nodeAttrs);
+ // The type of nodeAttrs.m_mwmSize and nodeAttrs.m_localMwmSize is TMwmSize (uint64_t).
+ // The condition below is necessary to prevent passing a big positive number as the first
+ // parameter of IsEnoughSpaceForDownload().
return IsEnoughSpaceForDownload(nodeAttrs.m_mwmSize > nodeAttrs.m_localMwmSize
? nodeAttrs.m_mwmSize - nodeAttrs.m_localMwmSize
: 0, storage.GetMaxMwmSizeBytes());