diff options
author | David Kalnischkies <david@kalnischkies.de> | 2017-06-04 18:14:13 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2017-06-26 23:31:15 +0200 |
commit | fc2055e1e08e4e3b662b0c5f67a0d0a57267acd3 (patch) | |
tree | bf071ffd9f1beb27847ec62d7186e7f2902cad41 /apt-pkg/orderlist.cc | |
parent | d0eb158be03f15139eee65c4162c9c6e3be10718 (diff) |
avoid explicit types for pkg counts by auto
Changes nothing on the program front and as the datatypes are
sufficently comparable fixes no bug either, but problems later on if we
ever change the types of those and prevent us using types which are too
large for the values we want to store waste (a tiny bit of) resources.
Gbp-Dch: Ignore
Diffstat (limited to 'apt-pkg/orderlist.cc')
-rw-r--r-- | apt-pkg/orderlist.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/orderlist.cc b/apt-pkg/orderlist.cc index 0be0cc8df..98793e6a9 100644 --- a/apt-pkg/orderlist.cc +++ b/apt-pkg/orderlist.cc @@ -93,7 +93,7 @@ pkgOrderList::pkgOrderList(pkgDepCache *pCache) : d(NULL), Cache(*pCache), /* Construct the arrays, egcs 1.0.1 bug requires the package count hack */ - unsigned long Size = Cache.Head().PackageCount; + auto const Size = Cache.Head().PackageCount; Flags = new unsigned short[Size]; End = List = new Package *[Size]; memset(Flags,0,sizeof(*Flags)*Size); @@ -1056,8 +1056,8 @@ bool pkgOrderList::AddLoop(DepIterator D) /* */ void pkgOrderList::WipeFlags(unsigned long F) { - unsigned long Size = Cache.Head().PackageCount; - for (unsigned long I = 0; I != Size; I++) + auto Size = Cache.Head().PackageCount; + for (decltype(Size) I = 0; I != Size; ++I) Flags[I] &= ~F; } /*}}}*/ |