Merge lp:~mc-return/unity/unity.merge-fix-member-variables-not-initialized-in-their-constructors into lp:unity

Proposed by MC Return
Status: Merged
Approved by: Brandon Schaefer
Approved revision: no longer in the source branch.
Merged at revision: 2902
Proposed branch: lp:~mc-return/unity/unity.merge-fix-member-variables-not-initialized-in-their-constructors
Merge into: lp:unity
Diff against target: 49 lines (+12/-6)
3 files modified
plugins/unityshell/src/StartupNotifyService.cpp (+2/-0)
plugins/unityshell/src/UnityShowdesktopHandler.cpp (+7/-6)
unity-shared/IconRenderer.cpp (+3/-0)
To merge this branch: bzr merge lp:~mc-return/unity/unity.merge-fix-member-variables-not-initialized-in-their-constructors
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
Thomi Richards (community) Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+133520@code.launchpad.net

Commit message

Initialized class member variables in their respective constructors.
Used false for bools, 0 for ints and object pointers like SnDisplay* or SnMonitorContext*.

To post a comment you must log in.
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) :
review: Approve
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Looks good to me. +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/StartupNotifyService.cpp'
2--- plugins/unityshell/src/StartupNotifyService.cpp 2011-07-21 14:59:25 +0000
3+++ plugins/unityshell/src/StartupNotifyService.cpp 2012-11-15 20:06:21 +0000
4@@ -32,6 +32,8 @@
5 }
6
7 StartupNotifyService::StartupNotifyService()
8+ : _sn_display(0)
9+ , _sn_monitor(0)
10 {
11 }
12
13
14=== modified file 'plugins/unityshell/src/UnityShowdesktopHandler.cpp'
15--- plugins/unityshell/src/UnityShowdesktopHandler.cpp 2012-11-06 18:19:09 +0000
16+++ plugins/unityshell/src/UnityShowdesktopHandler.cpp 2012-11-15 20:06:21 +0000
17@@ -79,12 +79,13 @@
18 return inhibiting_xid;
19 }
20
21-ShowdesktopHandler::ShowdesktopHandler (ShowdesktopHandlerWindowInterface *wi, compiz::WindowInputRemoverLockAcquireInterface *lock_acquire_interface) :
22- showdesktop_handler_window_interface_ (wi),
23- lock_acquire_interface_ (lock_acquire_interface),
24- remover_(),
25- state_ (StateVisible),
26- progress_ (0.0f)
27+ShowdesktopHandler::ShowdesktopHandler (ShowdesktopHandlerWindowInterface *wi, compiz::WindowInputRemoverLockAcquireInterface *lock_acquire_interface)
28+ : showdesktop_handler_window_interface_(wi)
29+ , lock_acquire_interface_(lock_acquire_interface)
30+ , remover_()
31+ , state_(StateVisible)
32+ , progress_(0.0f)
33+ , was_hidden_(false)
34 {
35 }
36
37
38=== modified file 'unity-shared/IconRenderer.cpp'
39--- unity-shared/IconRenderer.cpp 2012-11-06 18:19:09 +0000
40+++ unity-shared/IconRenderer.cpp 2012-11-15 20:06:21 +0000
41@@ -220,6 +220,9 @@
42 }
43
44 IconRenderer::IconRenderer()
45+ : icon_size(0)
46+ , image_size(0)
47+ , spacing(0)
48 {
49 pip_style = OUTSIDE_TILE;
50