r1839 - tools/prt-get/trunk/src
Author: jw Date: 2006-09-08 16:00:35 +0200 (Fri, 08 Sep 2006) New Revision: 1839 Modified: tools/prt-get/trunk/src/repository.cpp tools/prt-get/trunk/src/repository.h Log: prt-get: promote compareShadowPair Modified: tools/prt-get/trunk/src/repository.cpp =================================================================== --- tools/prt-get/trunk/src/repository.cpp 2006-09-08 13:53:58 UTC (rev 1838) +++ tools/prt-get/trunk/src/repository.cpp 2006-09-08 14:00:35 UTC (rev 1839) @@ -64,10 +64,10 @@ /*! - Returns a map of duplicate packages in the repository. The key is the name - of the package, the value a pair where \a first the shadowed port and + Returns a sorted list of duplicate packages in the repository. + In the pairs \a first is the shadowed port and \a second is the port which preceeds over \a first - \return a map of duplicate packages in the repository + \return a list of duplicate packages in the repository */ const list< pair<Package*, Package*> >& Repository::shadowedPackages() const { @@ -140,7 +140,8 @@ } } -int compareShadowPair(pair<Package*, Package*>& p1, pair<Package*, Package*>& p2) +int Repository::compareShadowPair(pair<Package*, Package*>& p1, + pair<Package*, Package*>& p2) { return p1.second->name() < p2.second->name(); } @@ -231,7 +232,8 @@ // no such package found, add m_packageMap[name] = p; } else if ( listDuplicate ) { - m_shadowedPackages.push_back(make_pair( p, hidden->second )); + m_shadowedPackages.push_back( + make_pair( p, hidden->second )); } else { delete p; } Modified: tools/prt-get/trunk/src/repository.h =================================================================== --- tools/prt-get/trunk/src/repository.h 2006-09-08 13:53:58 UTC (rev 1838) +++ tools/prt-get/trunk/src/repository.h 2006-09-08 14:00:35 UTC (rev 1839) @@ -69,6 +69,9 @@ static const std::string EXTERNAL_DEPENDENCY_FILE; private: + static int compareShadowPair(pair<Package*, Package*>& p1, + pair<Package*, Package*>& p2); + static const std::string CACHE_VERSION; bool m_useRegex;
participants (1)
-
crux@crux.nu