[ quantlib-Bugs-2568491 ] Coding standard errors in Quantlib

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ quantlib-Bugs-2568491 ] Coding standard errors in Quantlib

SourceForge.net
Bugs item #2568491, was opened at 2009-02-05 15:27
Message generated for change (Comment added) made by lballabio
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2568491&group_id=12740

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Marcel Stampfer (marcelstampfer)
Assigned to: Nobody/Anonymous (nobody)
Summary: Coding standard errors in Quantlib

Initial Comment:
Hi Luigi,

I'm just getting to know Quantlib and thought that a way I could get started with writing some code would be to do some static analysis. Doing this, I've found some potential bugs in the code that could be easily patched. Some of the errors that I've found have to do with the follow violations:

Calling virtual functions from constructors and destructors
Using local variables that have the same name as class/parent class variables
Not initializing all member variables in constructors
Downcasting a pointer to an abstract base class to a subclass
Making implicit conversions from one type to another
Passing objects by reference instead of by value (more an optimization issue)
Not throwing an exception by value or catching by reference

Do you think that any of these errors warrant patching? I could give concrete examples if you like but should download the SVN head beforehand as I'm using the release code.

Regards
Marcel

----------------------------------------------------------------------

>Comment By: Luigi Ballabio (lballabio)
Date: 2009-02-06 10:53

Message:
Yes, please go ahead.

Luigi


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2568491&group_id=12740

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev