diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | src/gui/browserbox.cpp | 4 | ||||
-rw-r--r-- | src/gui/windowlistener.h | 4 | ||||
-rw-r--r-- | src/net/chathandler.cpp | 1 | ||||
-rw-r--r-- | src/particle.cpp | 2 | ||||
-rw-r--r-- | src/particle.h | 3 | ||||
-rw-r--r-- | src/utils/trim.h | 2 |
7 files changed, 16 insertions, 8 deletions
@@ -1,3 +1,11 @@ +2007-09-20 Guillaume Melquiond <guillaume.melquiond@gmail.com> + + * src/gui/browserbox.cpp: Fixed missing const qualifier. + * src/gui/windowlistener.h: Reduced warning about unused parameter. + * src/particle.h, src/particle.cpp: Moved function out of header file. + * src/net/chathandler.cpp: Removed useless include. + * src/utils/trim.h: Fixed storage qualifier. + 2007-09-16 Guillaume Melquiond <guillaume.melquiond@gmail.com> * src/gui/button.cpp: Fixed improper const qualifier. diff --git a/src/gui/browserbox.cpp b/src/gui/browserbox.cpp index c618fa69..717342de 100644 --- a/src/gui/browserbox.cpp +++ b/src/gui/browserbox.cpp @@ -140,7 +140,7 @@ void BrowserBox::addRow(const std::string &row) { unsigned int i, j, y = 0; unsigned int nextChar; - char *hyphen = "~"; + char const *hyphen = "~"; int hyphenWidth = font->getWidth(hyphen); int x = 0; for (i = 0; i < mTextRows.size(); i++) @@ -362,7 +362,7 @@ BrowserBox::draw(gcn::Graphics *graphics) if (mMode == AUTO_WRAP) { unsigned int nextChar = j + 1; - char *hyphen = "~"; + char const *hyphen = "~"; int hyphenWidth = font->getWidth(hyphen); // Wraping between words (at blank spaces) diff --git a/src/gui/windowlistener.h b/src/gui/windowlistener.h index 08aab71d..24f6a7b8 100644 --- a/src/gui/windowlistener.h +++ b/src/gui/windowlistener.h @@ -73,12 +73,12 @@ class WindowListener /** * Called whenever the window is moved. */ - virtual void windowMoved(const WindowEvent &event) {} + virtual void windowMoved(const WindowEvent &) {} /** * Called whenever the window is resized. */ - virtual void windowResized(const WindowEvent &event) {} + virtual void windowResized(const WindowEvent &) {} }; typedef std::list<WindowListener*> WindowListeners; diff --git a/src/net/chathandler.cpp b/src/net/chathandler.cpp index afdc2ab5..713b8f22 100644 --- a/src/net/chathandler.cpp +++ b/src/net/chathandler.cpp @@ -37,7 +37,6 @@ #include "../gui/chat.h" #include "../utils/tostring.h" -#include "../utils/trim.h" extern Being *player_node; diff --git a/src/particle.cpp b/src/particle.cpp index 148bbf6f..cdd6af41 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -81,6 +81,8 @@ Particle::setupEngine() logger->log("Particle engine set up"); } +void Particle::draw(Graphics *, int, int) const {} + bool Particle::update() { diff --git a/src/particle.h b/src/particle.h index dd7c5ee2..045ab9b9 100644 --- a/src/particle.h +++ b/src/particle.h @@ -89,8 +89,7 @@ class Particle : public Sprite /** * Draws the particle image. */ - virtual void - draw(Graphics *graphics, int offsetX, int offsetY) const {} + virtual void draw(Graphics *graphics, int offsetX, int offsetY) const; /** * Necessary for sorting with the other sprites. diff --git a/src/utils/trim.h b/src/utils/trim.h index 1b5311e6..fec99100 100644 --- a/src/utils/trim.h +++ b/src/utils/trim.h @@ -31,7 +31,7 @@ * * @param str the string to trim spaces off */ -static void trim(std::string &str) +inline void trim(std::string &str) { std::string::size_type pos = str.find_last_not_of(' '); if (pos != std::string::npos) |