[Aptitude-svn-commit] r3549 - in branches/aptitude-0.3/aptitude: . src
Daniel Burrows
dburrows@costa.debian.org
Sat, 02 Jul 2005 16:14:42 +0000
Author: dburrows
Date: Sat Jul 2 16:14:39 2005
New Revision: 3549
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/pkg_sortpolicy.cc
branches/aptitude-0.3/aptitude/src/pkg_sortpolicy.h
Log:
Fix the sorting policy for the new internal interfaces.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Sat Jul 2 16:14:39 2005
@@ -1,5 +1,9 @@
2005-07-02 Daniel Burrows <dburrows@debian.org>
+ * src/pkg_sortpolicy.cc:
+
+ Fix the sorting policy to work with the new internal interfaces.
+
* src/vscreen/vs_multiplex.cc, src/vscreen/vs_multiplex.h:
Update the display of the multiplex's tabs for wide characters.
Modified: branches/aptitude-0.3/aptitude/src/pkg_sortpolicy.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/pkg_sortpolicy.cc (original)
+++ branches/aptitude-0.3/aptitude/src/pkg_sortpolicy.cc Sat Jul 2 16:14:39 2005
@@ -39,15 +39,15 @@
} \
-int pkg_sortpolicy_wrapper::compare(const vs_treeitem *item1,
- const vs_treeitem *item2) const
+int pkg_sortpolicy_wrapper::compare(vs_treeitem *item1,
+ vs_treeitem *item2) const
{
// erk. RTTI is nasty. Is there any way around it here?
const pkg_item *pitem1=dynamic_cast<const pkg_item *>(item1);
const pkg_item *pitem2=dynamic_cast<const pkg_item *>(item2);
if(!pitem1 || !pitem2)
- return strcmp(item1->tag(), item2->tag());
+ return wcscmp(item1->tag(), item2->tag());
else if(chain)
return chain->compare(pitem1->get_package(), pitem1->visible_version(),
pitem2->get_package(), pitem2->visible_version());
Modified: branches/aptitude-0.3/aptitude/src/pkg_sortpolicy.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/pkg_sortpolicy.h (original)
+++ branches/aptitude-0.3/aptitude/src/pkg_sortpolicy.h Sat Jul 2 16:14:39 2005
@@ -54,8 +54,8 @@
public:
pkg_sortpolicy_wrapper(pkg_sortpolicy *_chain):chain(_chain) {}
- int compare(const vs_treeitem *item1, const vs_treeitem *item2) const;
- bool operator()(const vs_treeitem *item1, const vs_treeitem *item2) const
+ int compare(vs_treeitem *item1, vs_treeitem *item2) const;
+ bool operator()(vs_treeitem *item1, vs_treeitem *item2) const
{
return (compare(item1, item2)<0);
}