The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=11683 ====================================================================== Reported By: Markus Elfring Assigned To: ====================================================================== Project: CMake Issue ID: 11683 Category: Development Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2011-01-11 14:44 CET Last Modified: 2011-01-11 14:44 CET ====================================================================== Summary: Improve implementation of constructors Description: I 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 ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2011-01-11 14:44 Markus Elfring New Issue ====================================================================== _______________________________________________ cmake-developers mailing list cmake-developers@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers