From 95e14ab79254cdddf5eb25984b74e370d31ab0c2 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Wed, 8 Mar 2006 19:52:02 +0000 Subject: Some fixes for compiling with pedantic compiler settings and const char* checks. --- src/gui/browserbox.h | 2 +- src/gui/buysell.cpp | 4 ++-- src/gui/menuwindow.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gui') diff --git a/src/gui/browserbox.h b/src/gui/browserbox.h index c6d8f117..95b181ad 100644 --- a/src/gui/browserbox.h +++ b/src/gui/browserbox.h @@ -139,7 +139,7 @@ class BrowserBox : public gcn::Widget, public gcn::MouseListener */ enum { UNDERLINE = 1, - BACKGROUND = 2, + BACKGROUND = 2 }; private: diff --git a/src/gui/buysell.cpp b/src/gui/buysell.cpp index ccd82db5..d4c33d30 100644 --- a/src/gui/buysell.cpp +++ b/src/gui/buysell.cpp @@ -31,12 +31,12 @@ BuySellDialog::BuySellDialog(): Window("Shop") { Button *buyButton = 0; - char *buttonNames[] = { + const char *buttonNames[] = { "Buy", "Sell", "Cancel", 0 }; int x = 10, y = 10; - for (char **curBtn = buttonNames; *curBtn; curBtn++) + for (const char **curBtn = buttonNames; *curBtn; curBtn++) { Button *btn = new Button(*curBtn); if (!buyButton) buyButton = btn; // For focus request diff --git a/src/gui/menuwindow.cpp b/src/gui/menuwindow.cpp index cb5fc654..811a10ab 100644 --- a/src/gui/menuwindow.cpp +++ b/src/gui/menuwindow.cpp @@ -53,12 +53,12 @@ MenuWindow::MenuWindow(): // Buttons // ------------ - char *buttonNames[] = { + const char *buttonNames[] = { "Status", "Equipment", "Inventory", "Skills", "Setup", 0 }; int x = 0, y = 3, h = 0; - for (char **curBtn = buttonNames; *curBtn; curBtn++) { + for (const char **curBtn = buttonNames; *curBtn; curBtn++) { gcn::Button *btn = new Button(*curBtn); btn->setEventId(*curBtn); btn->addActionListener(&menuWindowListener); -- cgit v1.2.3-70-g09d2