summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--src/channelmanager.cpp2
-rw-r--r--src/channelmanager.h5
-rw-r--r--src/gui/browserbox.cpp9
-rw-r--r--src/gui/linkhandler.h2
-rw-r--r--src/logindata.h6
-rw-r--r--src/utils/minmax.h2
7 files changed, 21 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 84dbf71a..1d15c616 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,11 @@
-2007-09-20 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+2007-09-22 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * src/gui/browserbox.cpp: Removed some useless things.
+ * src/logindata.h, src/gui/linkhandler.h, src/channelmanager.h,
+ src/channelmanager.cpp, src/utils/minmax.h: Fixed missing includes and
+ cleaned a bit.
+
+2007-09-21 Guillaume Melquiond <guillaume.melquiond@gmail.com>
* src/gui/chat.cpp: Fixed resizing of chat window.
diff --git a/src/channelmanager.cpp b/src/channelmanager.cpp
index 07dc2bbf..082581a1 100644
--- a/src/channelmanager.cpp
+++ b/src/channelmanager.cpp
@@ -55,7 +55,7 @@ Channel* ChannelManager::findById(int id)
return NULL;
}
-Channel* ChannelManager::findByName(std::string name)
+Channel *ChannelManager::findByName(std::string const &name)
{
Channel* channel;
if(name != "")
diff --git a/src/channelmanager.h b/src/channelmanager.h
index 3ad8f0b8..5e6b5ba1 100644
--- a/src/channelmanager.h
+++ b/src/channelmanager.h
@@ -24,6 +24,9 @@
#ifndef _TMW_CHANNELMANAGER_H
#define _TMW_CHANNELMANAGER_H
+#include <list>
+#include <string>
+
class Channel;
class ChannelManager
@@ -32,7 +35,7 @@ public:
ChannelManager();
~ChannelManager();
Channel* findById(int id);
- Channel* findByName(std::string name);
+ Channel *findByName(std::string const &name);
void addChannel(Channel *channel);
void removeChannel(Channel *channel);
private:
diff --git a/src/gui/browserbox.cpp b/src/gui/browserbox.cpp
index b69fdcbe..18853221 100644
--- a/src/gui/browserbox.cpp
+++ b/src/gui/browserbox.cpp
@@ -21,14 +21,9 @@
* $Id$
*/
-#include "browserbox.h"
-
#include <algorithm>
-#include <iostream>
-#include <guichan/graphics.hpp>
-#include <guichan/imagefont.hpp>
-#include <guichan/mouseinput.hpp>
+#include "browserbox.h"
#include "linkhandler.h"
#include "truetypefont.h"
@@ -261,7 +256,7 @@ BrowserBox::draw(gcn::Graphics *graphics)
}
}
- unsigned int i, j;
+ unsigned int i;
int x = 0, y = 0;
int wrappedLines = 0;
TrueTypeFont *font = static_cast<TrueTypeFont*>(getFont());
diff --git a/src/gui/linkhandler.h b/src/gui/linkhandler.h
index 33416ec7..3a32f825 100644
--- a/src/gui/linkhandler.h
+++ b/src/gui/linkhandler.h
@@ -24,6 +24,8 @@
#ifndef _TMW_LINK_HANDLER_H_
#define _TMW_LINK_HANDLER_H_
+#include <string>
+
/**
* A simple interface to windows that need to handle links from BrowserBox
* widget.
diff --git a/src/logindata.h b/src/logindata.h
index fbbbb573..ad6537b6 100644
--- a/src/logindata.h
+++ b/src/logindata.h
@@ -24,6 +24,8 @@
#ifndef _TMW_LOGINDATA_H
#define _TMW_LOGINDATA_H
+#include <string>
+
struct LoginData
{
std::string username;
@@ -32,10 +34,6 @@ struct LoginData
std::string email;
short port;
- int account_ID;
- int session_ID1;
- int session_ID2;
-
bool remember; /**< Whether to store the username and host. */
bool registerLogin; /**< Whether an account is being registered. */
diff --git a/src/utils/minmax.h b/src/utils/minmax.h
index ea6ad9e0..427c5da7 100644
--- a/src/utils/minmax.h
+++ b/src/utils/minmax.h
@@ -21,6 +21,8 @@
* $Id$
*/
+#include <cstdlib>
+
/**
* Returns a random numeric value that is larger than or equal min and smaller
* than max