MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004876ardourfeaturespublic2012-05-13 03:032012-05-21 02:18
Reporterelfring 
Assigned Topaul 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionwon't fix 
PlatformOSOS Version
Product Version 
Target Version3.XFixed in Version 
Summary0004876: Improve implementation of constructors
DescriptionI have noticed that some assignments are used in the constructor bodies.

Examples:
http://viewcvs.ardour.org/index.cgi/ardour2/ardour2/branches/3.0/libs/ardour/audioengine.cc?revision=12069&view=markup [^]
http://viewcvs.ardour.org/index.cgi/ardour2/ardour2/branches/3.0/libs/ardour/playlist.cc?revision=12131&view=markup [^]
http://viewcvs.ardour.org/index.cgi/ardour2/ardour2/branches/3.0/libs/ardour/session.cc?revision=12084&view=markup [^]

The recommended way for performing efficient construction is to use the initialisation list.
Additional Informationhttp://dietmar-kuehl.de/mirror/c++-faq/ctors.html#faq-10.6 [^]
http://cprogramming.com/tutorial/initialization-lists-c++.html [^]
http://goingware.com/tips/parameters/membervars.html [^]
http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=15&rl=1 [^]
http://www-h.eng.cam.ac.uk/help/importedHTML/languages/C++/Thinking_in_C++/tic0094.html [^]
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0013268)
paul (administrator)
2012-05-21 02:18

patches to change this would be welcome, but the overhead involved here is absolutely minimal (almost all of the affected variables are scalar, so there is no/almost no object construction going on) and the classes most affected are long lived and not often created. Notice, for example, that Regions use initialization lists exclusively.

i'm going to mark this as WONTFIX but that just means that i have no plans to change the code. patches would still be welcome if anyone wants to create them and attach them to this bug.

- Issue History
Date Modified Username Field Change
2012-05-13 03:03 elfring New Issue
2012-05-13 05:24 cth103 cost => 0.00
2012-05-13 05:24 cth103 Status new => confirmed
2012-05-13 05:24 cth103 Target Version => 3.X
2012-05-21 02:18 paul Note Added: 0013268
2012-05-21 02:18 paul Status confirmed => resolved
2012-05-21 02:18 paul Resolution open => won't fix
2012-05-21 02:18 paul Assigned To => paul


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker