summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-06-09 10:50:32 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-06-09 10:50:32 +0200
commit1aa9b2974d33015102224ffb738b2e8e0a4bcb42 (patch)
treeb8c164c9634d2c6cf6bc245cd6fce50f680dea78 /apt-pkg/acquire.cc
parent3c9772456931842dee211444086c15dd2e5f9a29 (diff)
parent3a882565a943644dcf7287c9673fb07f617fb851 (diff)
* apt-pkg/pkgcache.h:
- switch {,Install-}Size to unsigned long long - deal with long long, not with int to remove 2GB Limit (LP: #250909) - deprecate AddSize with Multiplier as it is unused and switch to boolean instead to handle the sizes more gracefully. - switch i{Download,Usr}Size from double to (un)signed long long * cmdline/apt-get.cc: - use unsigned long long instead of double to store values it gets
Diffstat (limited to 'apt-pkg/acquire.cc')
-rw-r--r--apt-pkg/acquire.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index 832eaa02c..63825da93 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -506,9 +506,9 @@ bool pkgAcquire::Clean(string Dir)
// Acquire::TotalNeeded - Number of bytes to fetch /*{{{*/
// ---------------------------------------------------------------------
/* This is the total number of bytes needed */
-double pkgAcquire::TotalNeeded()
+unsigned long long pkgAcquire::TotalNeeded()
{
- double Total = 0;
+ unsigned long long Total = 0;
for (ItemCIterator I = ItemsBegin(); I != ItemsEnd(); I++)
Total += (*I)->FileSize;
return Total;
@@ -517,9 +517,9 @@ double pkgAcquire::TotalNeeded()
// Acquire::FetchNeeded - Number of bytes needed to get /*{{{*/
// ---------------------------------------------------------------------
/* This is the number of bytes that is not local */
-double pkgAcquire::FetchNeeded()
+unsigned long long pkgAcquire::FetchNeeded()
{
- double Total = 0;
+ unsigned long long Total = 0;
for (ItemCIterator I = ItemsBegin(); I != ItemsEnd(); I++)
if ((*I)->Local == false)
Total += (*I)->FileSize;
@@ -529,9 +529,9 @@ double pkgAcquire::FetchNeeded()
// Acquire::PartialPresent - Number of partial bytes we already have /*{{{*/
// ---------------------------------------------------------------------
/* This is the number of bytes that is not local */
-double pkgAcquire::PartialPresent()
+unsigned long long pkgAcquire::PartialPresent()
{
- double Total = 0;
+ unsigned long long Total = 0;
for (ItemCIterator I = ItemsBegin(); I != ItemsEnd(); I++)
if ((*I)->Local == false)
Total += (*I)->PartialSize;