View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011683CMakeDevelopmentpublic2011-01-11 08:442011-01-11 08:59
ReporterMarkus Elfring 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product VersionCMake 2.8.3 
Target VersionFixed in Version 
Summary0011683: Improve implementation of constructors
DescriptionI have noticed that some assignments are used in the constructor bodies.

Examples:
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmCacheManager.cxx;hb=a2a997d8c479e2b0a56354ef107239f550117c44#l36 [^]
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmXCodeObject.cxx;hb=a8ded5338bf44173fe33e0249ab14aa3d8e7540c#l36 [^]
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/kwsys/Glob.cxx;hb=f9687e328f7ea64ea6384aae11af36fdd3a12643#l59 [^]

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

 Relationships

  Notes
(0024576)
Brad King (manager)
2011-01-11 08:59

We are competent C++ programmers and are familiar with such issues. Every real-world project has unlimited ways of improving its code style with no change in functionality, but no one has time to make everything perfect everywhere.

 Issue History
Date Modified Username Field Change
2011-01-11 08:44 Markus Elfring New Issue
2011-01-11 08:59 Brad King Note Added: 0024576
2011-01-11 08:59 Brad King Status new => closed
2011-01-11 08:59 Brad King Assigned To => Brad King
2011-01-11 08:59 Brad King Resolution open => no change required


Copyright © 2000 - 2018 MantisBT Team