summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-03-08 19:52:02 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-03-08 19:52:02 +0000
commit95e14ab79254cdddf5eb25984b74e370d31ab0c2 (patch)
treeefd0e7d2632937504bbe4f67db760887750073b4
parent405c23831a4e1363f26f848215c8140f6d6d9f78 (diff)
downloadmana-95e14ab79254cdddf5eb25984b74e370d31ab0c2.tar.gz
mana-95e14ab79254cdddf5eb25984b74e370d31ab0c2.tar.bz2
mana-95e14ab79254cdddf5eb25984b74e370d31ab0c2.tar.xz
mana-95e14ab79254cdddf5eb25984b74e370d31ab0c2.zip
Some fixes for compiling with pedantic compiler settings and const char* checks.
-rw-r--r--ChangeLog11
-rw-r--r--src/gui/browserbox.h2
-rw-r--r--src/gui/buysell.cpp4
-rw-r--r--src/gui/menuwindow.cpp4
-rw-r--r--src/resources/image.cpp4
5 files changed, 15 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 31ed1e40..3ffc0445 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-03-08 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/browserbox.h, src/gui/menuwindow.cpp, src/gui/buysell.cpp:
+ Some fixes for compiling with pedantic compiler settings and const
+ char* checks.
+
2006-03-08 Björn Steinbrink <B.Steinbrink@gmx.de>
* src/map.cpp, src/main.cpp, src/gui/button.cpp,
@@ -23,9 +29,8 @@
2006-03-07 Yohann Ferreira <bertram@cegetel.net>
- * trunk/debian/rules, trunk/debian/changelog,
- tags/0.0.19/debian/rules, tags/0.0.19/debian/changelog,
- trunk/ChangeLog: Updating Debian files for 0.0.19 release.
+ * debian/rules, debian/changelog, ChangeLog: Updating Debian files for
+ 0.0.19 release.
2006-03-07 Eugenio Favalli <elvenprogrammer@gmail.com>
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);
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index 5176ec7a..f5082c60 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -158,11 +158,11 @@ Image* Image::load(void *buffer, unsigned int bufferSize,
int height = tmpImage->h;
int realWidth = 1, realHeight = 1;
- while (realWidth < width && realWidth < 2048) {
+ while (realWidth < width && realWidth < 1024) {
realWidth *= 2;
}
- while (realHeight < height && realHeight < 2048) {
+ while (realHeight < height && realHeight < 1024) {
realHeight *= 2;
}