summaryrefslogtreecommitdiff
authorzecke <zecke>2004-10-17 18:38:39 (UTC)
committer zecke <zecke>2004-10-17 18:38:39 (UTC)
commite95fcb09fc069a83b3c10c19c081873daba49831 (patch) (side-by-side diff)
tree13d13bac82d5bcf2489075e4f2962685ff3c897d
parent7e28835e246e06e157d760a40754b6257f2ad6b3 (diff)
downloadopie-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
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/firstuse.cpp9
-rw-r--r--libopie2/opiepim/core/opimevent.cpp2
-rw-r--r--library/backend/event.cpp2
-rw-r--r--noncore/applets/zkbapplet/keyzcfg/zkbnames.cpp18
-rw-r--r--noncore/games/qasteroids/view.cpp7
-rw-r--r--noncore/games/solitaire/cardpile.h2
6 files changed, 25 insertions, 15 deletions
diff --git a/core/launcher/firstuse.cpp b/core/launcher/firstuse.cpp
index acddeea..8344787 100644
--- a/core/launcher/firstuse.cpp
+++ b/core/launcher/firstuse.cpp
@@ -63,4 +63,4 @@ using namespace Opie::Core;
-struct {
- bool enabled;
+struct settingsTable_t {
+ bool enabled : 1;
const char *app;
@@ -69,4 +69,5 @@ struct {
const char *desc;
-}
-settingsTable [] =
+};
+
+static settingsTable_t settingsTable [] =
{
diff --git a/libopie2/opiepim/core/opimevent.cpp b/libopie2/opiepim/core/opimevent.cpp
index c656c3d..7bc6c32 100644
--- a/libopie2/opiepim/core/opimevent.cpp
+++ b/libopie2/opiepim/core/opimevent.cpp
@@ -72,3 +72,3 @@ int OCalendarHelper::dayOfWeek( char day )
char i = OPimRecurrence::MON;
- while ( !( i & day ) && i <= OPimRecurrence::SUN )
+ while ( !( i & day ) && i <= static_cast<char>(OPimRecurrence::SUN) )
{
diff --git a/library/backend/event.cpp b/library/backend/event.cpp
index 90860e8..abc420b 100644
--- a/library/backend/event.cpp
+++ b/library/backend/event.cpp
@@ -401,3 +401,3 @@ int Event::dayOfWeek( char day )
char i = Event::MON;
- while ( !( i & day ) && i <= Event::SUN ) {
+ while ( !( i & day ) && i <= static_cast<char>(Event::SUN) ) {
i <<= 1;
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
@@ -7,6 +7,8 @@ QString Null_String((const char*) 0);
// Implementation of KeyNames
-static struct {
+struct Key_Names_t {
int key;
char *name;
-} Key_Names[] = {
+};
+
+static const Key_Names_t Key_Names[] = {
{ 32, "Space" },
@@ -107,6 +109,8 @@ const QString& KeyNames::find(int k) {
// Implementation of ModifierNames
-struct {
+struct Modifier_Names_t {
int value;
char* name;
-} Modifier_Names[] = {
+};
+
+static const Modifier_Names_t Modifier_Names[] = {
{ 8, "Shift" },
@@ -161,6 +165,8 @@ const QString& ModifierNames::find(int k) {
-struct {
+struct Keycode_Names_t {
char* name;
int keycode;
-} Keycode_Names[] = {
+};
+
+static const Keycode_Names_t Keycode_Names[] = {
{ "Escape", 0x1000 },
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
@@ -57,3 +57,3 @@
-struct
+struct kas_animations_t
{
@@ -62,4 +62,5 @@ struct
int frames;
-}
-kas_animations [] =
+};
+
+static const kas_animations_t kas_animations [] =
{
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
@@ -22,2 +22,4 @@
+#include "card.h"
+