[ icewm-Bugs-3469478 ] Improve implementation of constructors

SourceForge.net <[email protected]> Wed, 04 Jan 2012 09:18:17 -0800
Newsgroups gmane.comp.window-managers.icewm.devel
Message-ID <[email protected]>
Bugs item #3469478, was opened at 2012-01-04 09:18
Message generated for change (Tracker Item Submitted) made by elfring
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100031&aid=3469478&group_id=31

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: icewm-1.3
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Markus Elfring (elfring)
Assigned to: Nobody/Anonymous (nobody)
Summary: Improve implementation of constructors

Initial Comment:
I have noticed that some assignments are used in the constructor bodies.

Examples:
http://icewm.cvs.sourceforge.net/viewvc/icewm/icewm-1.2/src/ywindow.cc?revision=1.54&view=markup
http://icewm.cvs.sourceforge.net/viewvc/icewm/icewm-1.2/src/yapp.cc?revision=1.59&view=markup
http://icewm.cvs.sourceforge.net/viewvc/icewm/icewm-1.2/src/ytimer.cc?revision=1.2&view=markup

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.codeguru.com/cpp/tic/tic0145.shtml
http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=15&rl=1
http://goingware.com/tips/parameters/membervars.html

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100031&aid=3469478&group_id=31

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox