[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unneccessary helper function
From: |
David Philippi |
Subject: |
Re: Unneccessary helper function |
Date: |
Fri, 7 Jun 2002 21:35:53 +0200 |
User-agent: |
KMail/1.4.1 |
On Friday 07 June 2002 21:20, Ingo Ruhnke wrote:
> insert() doesn't really help here, in the few places where I used
> append(), it is used to directly append a list return from a function
> to another list, using insert() would force a temporary variable
> there, which would be kind of ugly.
> ListHelper::append (editor_objs, i->create_EditorObj ());
I changed it in CVS already. Using a temporary variable would be ugly, right.
But noone stopped me from using a reference to define a name for the
anonymous return value of the method. This has no performance impact at all,
well the reference doesn't have one. I suppose insert() is a bit faster then
a loop of push_back. ;-)
Bye David