author | zecke <zecke> | 2004-10-17 18:38:39 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-10-17 18:38:39 (UTC) |
commit | e95fcb09fc069a83b3c10c19c081873daba49831 (patch) (unidiff) | |
tree | 13d13bac82d5bcf2489075e4f2962685ff3c897d /noncore | |
parent | 7e28835e246e06e157d760a40754b6257f2ad6b3 (diff) | |
download | opie-e95fcb09fc069a83b3c10c19c081873daba49831.zip opie-e95fcb09fc069a83b3c10c19c081873daba49831.tar.gz opie-e95fcb09fc069a83b3c10c19c081873daba49831.tar.bz2 |
G++ 4.0 compiler fixes
-Remove anonymous structures and name them
-Include 'card.h' to cardpile to make 'Card' known to QList
so deleteItem will work
-cast 'enum' to char in event.cpp and opimevent.cpp
-rw-r--r-- | noncore/applets/zkbapplet/keyzcfg/zkbnames.cpp | 26 | ||||
-rw-r--r-- | noncore/games/qasteroids/view.cpp | 7 | ||||
-rw-r--r-- | noncore/games/solitaire/cardpile.h | 2 |
3 files changed, 22 insertions, 13 deletions
diff --git a/noncore/applets/zkbapplet/keyzcfg/zkbnames.cpp b/noncore/applets/zkbapplet/keyzcfg/zkbnames.cpp index b2180ba..a47bf6c 100644 --- a/noncore/applets/zkbapplet/keyzcfg/zkbnames.cpp +++ b/noncore/applets/zkbapplet/keyzcfg/zkbnames.cpp | |||
@@ -5,10 +5,12 @@ | |||
5 | QString Null_String((const char*) 0); | 5 | QString Null_String((const char*) 0); |
6 | 6 | ||
7 | // Implementation of KeyNames | 7 | // Implementation of KeyNames |
8 | static struct { | 8 | struct Key_Names_t { |
9 | int key; | 9 | int key; |
10 | char *name; | 10 | char *name; |
11 | } Key_Names[] = { | 11 | }; |
12 | |||
13 | static const Key_Names_t Key_Names[] = { | ||
12 | { 32, "Space" }, | 14 | { 32, "Space" }, |
13 | { 39, "Apostrophe" }, | 15 | { 39, "Apostrophe" }, |
14 | { 44, "Comma" }, | 16 | { 44, "Comma" }, |
@@ -105,10 +107,12 @@ const QString& KeyNames::find(int k) { | |||
105 | } | 107 | } |
106 | 108 | ||
107 | // Implementation of ModifierNames | 109 | // Implementation of ModifierNames |
108 | struct { | 110 | struct Modifier_Names_t { |
109 | int value; | 111 | int value; |
110 | char* name; | 112 | char* name; |
111 | } Modifier_Names[] = { | 113 | }; |
114 | |||
115 | static const Modifier_Names_t Modifier_Names[] = { | ||
112 | { 8, "Shift" }, | 116 | { 8, "Shift" }, |
113 | { 16, "Control" }, | 117 | { 16, "Control" }, |
114 | { 32, "Alt" }, | 118 | { 32, "Alt" }, |
@@ -159,14 +163,16 @@ const QString& ModifierNames::find(int k) { | |||
159 | 163 | ||
160 | // Implementation of KeycodeNames | 164 | // Implementation of KeycodeNames |
161 | 165 | ||
162 | struct { | 166 | struct Keycode_Names_t { |
163 | char* name; | 167 | char* name; |
164 | int keycode; | 168 | int keycode; |
165 | } Keycode_Names[] = { | 169 | }; |
170 | |||
171 | static const Keycode_Names_t Keycode_Names[] = { | ||
166 | { "Escape", 0x1000 }, | 172 | { "Escape", 0x1000 }, |
167 | { "Tab", 0x1001 }, | 173 | { "Tab", 0x1001 }, |
168 | { "Backtab", 0x1002 }, | 174 | { "Backtab", 0x1002 }, |
169 | { "Backspace", 0x1003 }, | 175 | { "Backspace", 0x1003 }, |
170 | { "BackSpace", 0x1003 }, | 176 | { "BackSpace", 0x1003 }, |
171 | { "Return", 0x1004 }, | 177 | { "Return", 0x1004 }, |
172 | { "Enter", 0x1005 }, | 178 | { "Enter", 0x1005 }, |
@@ -181,9 +187,9 @@ struct { | |||
181 | { "Up", 0x1013 }, | 187 | { "Up", 0x1013 }, |
182 | { "Right", 0x1014 }, | 188 | { "Right", 0x1014 }, |
183 | { "Down", 0x1015 }, | 189 | { "Down", 0x1015 }, |
184 | { "Prior", 0x1016 }, | 190 | { "Prior", 0x1016 }, |
185 | { "PageUp", 0x1016 }, | 191 | { "PageUp", 0x1016 }, |
186 | { "Next", 0x1017 }, | 192 | { "Next", 0x1017 }, |
187 | { "PageDown", 0x1017 }, | 193 | { "PageDown", 0x1017 }, |
188 | { "Shift", 0x1020 }, | 194 | { "Shift", 0x1020 }, |
189 | { "Control", 0x1021 }, | 195 | { "Control", 0x1021 }, |
diff --git a/noncore/games/qasteroids/view.cpp b/noncore/games/qasteroids/view.cpp index 352c63b..3a4d410 100644 --- a/noncore/games/qasteroids/view.cpp +++ b/noncore/games/qasteroids/view.cpp | |||
@@ -55,13 +55,14 @@ | |||
55 | #define M_PI 3.141592654 | 55 | #define M_PI 3.141592654 |
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | struct | 58 | struct kas_animations_t |
59 | { | 59 | { |
60 | int id; | 60 | int id; |
61 | const char *path; | 61 | const char *path; |
62 | int frames; | 62 | int frames; |
63 | } | 63 | }; |
64 | kas_animations [] = | 64 | |
65 | static const kas_animations_t kas_animations [] = | ||
65 | { | 66 | { |
66 | // { ID_ROCK_LARGE, "rock1/rock1\%1.png", 32 }, | 67 | // { ID_ROCK_LARGE, "rock1/rock1\%1.png", 32 }, |
67 | { ID_ROCK_MEDIUM, "rock2/rock2\%1.png", 32 }, | 68 | { ID_ROCK_MEDIUM, "rock2/rock2\%1.png", 32 }, |
diff --git a/noncore/games/solitaire/cardpile.h b/noncore/games/solitaire/cardpile.h index 1eb2499..757e6b3 100644 --- a/noncore/games/solitaire/cardpile.h +++ b/noncore/games/solitaire/cardpile.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #ifndef CARD_PILE_H | 20 | #ifndef CARD_PILE_H |
21 | #define CARD_PILE_H | 21 | #define CARD_PILE_H |
22 | 22 | ||
23 | #include "card.h" | ||
24 | |||
23 | 25 | ||
24 | #include <qpoint.h> | 26 | #include <qpoint.h> |
25 | #include <qlist.h> | 27 | #include <qlist.h> |