Changeset View
Changeset View
Standalone View
Standalone View
src/kiconeffect.cpp
Show All 34 Lines | |||||
35 | 35 | | |||
36 | #include <kcolorscheme.h> | 36 | #include <kcolorscheme.h> | ||
37 | #include <kicontheme.h> | 37 | #include <kicontheme.h> | ||
38 | #include <kconfiggroup.h> | 38 | #include <kconfiggroup.h> | ||
39 | 39 | | |||
40 | class KIconEffectPrivate | 40 | class KIconEffectPrivate | ||
41 | { | 41 | { | ||
42 | public: | 42 | public: | ||
43 | int effect[6][3]; | 43 | // http://en.cppreference.com/w/cpp/language/zero_initialization | ||
44 | float value[6][3]; | 44 | KIconEffectPrivate() | ||
apol: To what does this initialize the array? | |||||
effect: 0 jtamate: effect: 0
value: 0
color: QColor(Invalid)
trans: false
key: ""
color2: QColor(Invalid)
| |||||
it may be a good idea to add a comment that links to http://en.cppreference.com/w/cpp/language/zero_initialization to clarify what's happening here mwolff: it may be a good idea to add a comment that links to http://en.cppreference. | |||||
45 | QColor color[6][3]; | 45 | : effect{{}} | ||
46 | bool trans[6][3]; | 46 | , value{{}} | ||
47 | QString key[6][3]; | 47 | , color{{}} | ||
48 | QColor color2[6][3]; | 48 | , trans{{}} | ||
49 | , key{{}} | ||||
anthonyfieroni: You can use {{}} to all | |||||
50 | , color2{{}} | ||||
51 | { | ||||
52 | } | ||||
53 | | ||||
54 | public: | ||||
55 | int effect[KIconLoader::LastGroup][KIconLoader::LastState]; | ||||
56 | float value[KIconLoader::LastGroup][KIconLoader::LastState]; | ||||
57 | QColor color[KIconLoader::LastGroup][KIconLoader::LastState]; | ||||
58 | bool trans[KIconLoader::LastGroup][KIconLoader::LastState]; | ||||
59 | QString key[KIconLoader::LastGroup][KIconLoader::LastState]; | ||||
60 | QColor color2[KIconLoader::LastGroup][KIconLoader::LastState]; | ||||
49 | }; | 61 | }; | ||
50 | 62 | | |||
51 | KIconEffect::KIconEffect() | 63 | KIconEffect::KIconEffect() | ||
52 | : d(new KIconEffectPrivate) | 64 | : d(new KIconEffectPrivate) | ||
53 | { | 65 | { | ||
54 | init(); | 66 | init(); | ||
55 | } | 67 | } | ||
56 | 68 | | |||
▲ Show 20 Lines • Show All 667 Lines • Show Last 20 Lines |
To what does this initialize the array?