On Wed, 2007-07-11 at 09:28 -0700, [hidden email] wrote:
> Revision: 11869 > http://quantlib.svn.sourceforge.net/quantlib/?rev=11869&view=rev > Author: fdv1 > Date: 2007-07-11 09:28:06 -0700 (Wed, 11 Jul 2007) > > Log Message: > ----------- > CashFlows::npv signature changed to avoid useless dynamic memory > allocation. > As a general rule I think that it might be a good practice to > dereference pointers or Handles as early as possible so we can use > plain reference later on. This would save indirections and remove the > need to store objects systematically in the heap. Well, most objects will have to be on the heap anyway since that's the only way to store them as data members and keep polymorphic behavior. But you're right, we can use references when we pass them as function arguments. However, we'll have to find a less clumsy syntax than *handle.currentLink(). Let me look into it... Later, Luigi -- Every solution breeds new problems. -- unknown ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Hi François,
On 7/11/07, [hidden email] <[hidden email]> wrote: > Revision: 11869 > http://quantlib.svn.sourceforge.net/quantlib/?rev=11869&view=rev > Author: fdv1 > Date: 2007-07-11 09:28:06 -0700 (Wed, 11 Jul 2007) > > Log Message: > ----------- > CashFlows::npv signature changed to avoid useless dynamic memory allocation. > As a general rule I think that it might be a good practice to dereference pointers or Handles as early as possible so we can use plain reference later on. This would save indirections and remove the need to store objects systematically in the heap. well, actually when it comes to general rules I'm more sensitive to the one that defines as mandatory to update your working copy and run successfully the test suite before committing to the trunk :-) Your change broke 3 test suites (asset swap, bonds, and convertible bonds): please revert it or fix it. thank you ciao -- Nando ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
On Thu, 2007-07-12 at 13:01 +0200, Ferdinando Ametrano wrote:
> Your change broke 3 test suites (asset swap, bonds, and convertible > bonds) Probably this change: <http://quantlib.svn.sourceforge.net/viewvc/quantlib/trunk/QuantLib/ql/instruments/bond.cpp?r1=11869&r2=11868&pathrev=11869> It seems that one of the two settlementDate() calls got lost... Luigi -- Zawinski's Law: Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
In reply to this post by Ferdinando M. Ametrano-3
On Thu, 2007-07-12 at 13:01 +0200, Ferdinando Ametrano wrote:
> Your change broke 3 test suites (asset swap, bonds, and convertible > bonds): please revert it or fix it. And while François fixes this, it wouldn't be bad if someone fixed the digital-coupon one, too... Luigi -- A child of five would understand this. Send someone to fetch a child of five. -- Groucho Marx ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Free forum by Nabble | Edit this page |