[Aptitude-svn-commit] r3310 - in branches/aptitude-0.3/aptitude: . src/vscreen
Daniel Burrows
dburrows@costa.debian.org
Sat, 04 Jun 2005 18:00:30 +0000
Author: dburrows
Date: Sat Jun 4 18:00:28 2005
New Revision: 3310
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/vscreen/vs_subtree.h
Log:
Cut down on string copies.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Sat Jun 4 18:00:28 2005
@@ -1,5 +1,10 @@
2005-06-04 Daniel Burrows <dburrows@debian.org>
+ * src/vscreen/vs_subtree.h:
+
+ Update a few minor things in vs_subtree (particularly
+ added code to avoid string copies).
+
* src/vscreen/vs_tree.cc, src/vscreen/vs_tree.h, src/vscreen/vs_treeitem.cc, src/vscreen/vs_treeitem.h:
Update the core tree code to the new display protocol.
Modified: branches/aptitude-0.3/aptitude/src/vscreen/vs_subtree.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/vs_subtree.h (original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/vs_subtree.h Sat Jun 4 18:00:28 2005
@@ -1,6 +1,6 @@
// vs_subtree.h (this is -*-c++-*-)
//
-// Copyright 1999 Daniel Burrows
+// Copyright 1999-2003, 2005 Daniel Burrows
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
// the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
//
-// Subtrees for vs_trees [ my header files are getting out of hand :P ]
+// Subtrees for vs_trees.
#ifndef VS_SUBTREE_H
#define VS_SUBTREE_H
@@ -96,7 +96,7 @@
}
void paint(vs_tree *win, int y, bool hierarchical,
- std::string str, int depth_shift=2)
+ const std::string &str, int depth_shift=2)
{
int width, height;
int basex=hierarchical?depth_shift*get_depth():0;