diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2017-05-11 14:09:40 +0300 |
---|---|---|
committer | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2017-05-19 16:41:57 +0300 |
commit | c0099b86ce3bfe936988b17654dbd3f1698efd90 (patch) | |
tree | 6eabc95517e31ebbd7f0de8b11196691cee2ddf9 /storage | |
parent | aa75d98f6d472ba75b37aebbae04cc74342b9be8 (diff) |
Adding comment at IsEnoughSpaceForDownload() method.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/storage_helpers.cpp | 3 |
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()); |