]> git.saurik.com Git - apt.git/commitdiff
Fix the following gcc-4.5 buildfailure in pkgcache.cc by following the suggestion:
authorDavid Kalnischkies <kalnischkies@gmail.com>
Sat, 2 Jan 2010 16:19:07 +0000 (17:19 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Sat, 2 Jan 2010 16:19:07 +0000 (17:19 +0100)
pkgcache.cc: In member function ‘const char* pkgCache::PkgIterator::CandVersion() const’:
pkgcache.cc:301:51: error: cannot call constructor ‘pkgPolicy::pkgPolicy’ directly
pkgcache.cc:301:51: note: for a function-style cast, remove the redundant ‘::pkgPolicy’

apt-pkg/pkgcache.cc

index 997ff51fe32cbce0db9ccb44205faa634b288f67..eb7e4957a0eec5f23ccc925e1510bdf148d07630 100644 (file)
@@ -298,7 +298,7 @@ const char *
 pkgCache::PkgIterator::CandVersion() const 
 {
   //TargetVer is empty, so don't use it.
-  VerIterator version = pkgPolicy::pkgPolicy(Owner).GetCandidateVer(*this);
+  VerIterator version = pkgPolicy(Owner).GetCandidateVer(*this);
   if (version.IsGood())
     return version.VerStr();
   return 0;