summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-07-08 02:19:52 +0300
committerAndrei Karas <akaras@inbox.ru>2011-07-08 02:19:52 +0300
commit27c3646d10e0c5d25905d7afc7a43289159f711b (patch)
tree90257515af3615f169252161fc62b8d571076936 /src
parent5e14ab971129eb95ca02e373fc21adb46c0eaca1 (diff)
downloadplus-27c3646d10e0c5d25905d7afc7a43289159f711b.tar.gz
plus-27c3646d10e0c5d25905d7afc7a43289159f711b.tar.bz2
plus-27c3646d10e0c5d25905d7afc7a43289159f711b.tar.xz
plus-27c3646d10e0c5d25905d7afc7a43289159f711b.zip
Fix some issues after automatic checking.
Change compilation flags in make scripts.
Diffstat (limited to 'src')
-rw-r--r--src/being.cpp1
-rw-r--r--src/configuration.cpp7
-rw-r--r--src/configuration.h2
-rw-r--r--src/graphicsvertexes.h3
-rw-r--r--src/gui/setup_video.cpp3
-rw-r--r--src/gui/shopwindow.h2
-rw-r--r--src/gui/tradewindow.cpp4
-rw-r--r--src/gui/updatewindow.cpp2
-rw-r--r--src/map.cpp5
-rw-r--r--src/net/tmwa/chathandler.cpp4
10 files changed, 19 insertions, 14 deletions
diff --git a/src/being.cpp b/src/being.cpp
index fcf230dc0..cbdb8af8d 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -2307,7 +2307,6 @@ void Being::saveComment(const std::string &name,
{
std::string dir = Client::getUsersDirectory()
+ stringToHexPath(name);
- std::string fileName = dir + "/comment.txt";
ResourceManager *resman = ResourceManager::getInstance();
resman->saveTextFile(dir, "comment.txt", name + "\n" + comment);
}
diff --git a/src/configuration.cpp b/src/configuration.cpp
index 2d569314a..21d9d998f 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -145,6 +145,13 @@ ConfigurationObject::~ConfigurationObject()
clear();
}
+Configuration::Configuration() :
+ mConfigPath(""),
+ mDefaultsData(0),
+ mDirectory("")
+{
+}
+
void Configuration::cleanDefaults()
{
if (mDefaultsData)
diff --git a/src/configuration.h b/src/configuration.h
index 64c60c734..4b0238e9a 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -209,6 +209,8 @@ class ConfigurationObject
class Configuration : public ConfigurationObject
{
public:
+ Configuration();
+
~Configuration();
/**
diff --git a/src/graphicsvertexes.h b/src/graphicsvertexes.h
index c5daab6cb..c462de976 100644
--- a/src/graphicsvertexes.h
+++ b/src/graphicsvertexes.h
@@ -30,6 +30,9 @@
#define NO_SDL_GLEXT
#include <SDL_opengl.h>
+
+#include "opengl1graphics.h"
+#include "openglgraphics.h"
#endif
#include <string>
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index 8afb0ae69..d3ee64f3a 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -302,7 +302,8 @@ Setup_Video::Setup_Video():
mPickupParticleCheckBox(new CheckBox(_("as particle"),
mPickupParticleEnabled)),
mAlphaCacheCheckBox(new CheckBox(_("Enable opacity cache"), mAlphaCache)),
- mEnableMapReduceCheckBox(new CheckBox(_("Enable map reduce"), mEnableMapReduce)),
+ mEnableMapReduceCheckBox(new CheckBox(_("Enable map reduce"),
+ mEnableMapReduce)),
mShowBackgroundCheckBox(new CheckBox(_("Show background"),
mShowBackground)),
mSpeechSlider(new Slider(0, 3)),
diff --git a/src/gui/shopwindow.h b/src/gui/shopwindow.h
index bad4a0a4e..e07803225 100644
--- a/src/gui/shopwindow.h
+++ b/src/gui/shopwindow.h
@@ -95,7 +95,7 @@ class ShopWindow : public Window, public gcn::ActionListener,
* Returns true if any instances exist.
*/
static bool isActive()
- { return instances.size() > 0; }
+ { return !instances.empty(); }
void setItemSelected(int id)
{ mSelectedItem = id; updateButtonsAndLabels(); }
diff --git a/src/gui/tradewindow.cpp b/src/gui/tradewindow.cpp
index e3fb323e6..c607636d9 100644
--- a/src/gui/tradewindow.cpp
+++ b/src/gui/tradewindow.cpp
@@ -85,10 +85,6 @@ TradeWindow::TradeWindow():
if (setupWindow)
setupWindow->registerWindowForReset(this);
- std::string longestName = getFont()->getWidth(_("OK")) >
- getFont()->getWidth(_("Trade")) ?
- _("OK") : _("Trade");
-
mAddButton = new Button(_("Add"), "add", this);
mOkButton = new Button("", "", this); // Will be filled in later
diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp
index 42ed1c289..d17defb45 100644
--- a/src/gui/updatewindow.cpp
+++ b/src/gui/updatewindow.cpp
@@ -537,8 +537,6 @@ void UpdaterWindow::logic()
}
}
- std::string filename = mUpdatesDir + "/" + mCurrentFile;
-
switch (mDownloadStatus)
{
case UPDATE_ERROR:
diff --git a/src/map.cpp b/src/map.cpp
index 0d98628fd..8d7002689 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -906,6 +906,9 @@ void Map::blockTile(int x, int y, BlockType type)
case BLOCKTYPE_WATER:
mMetaTiles[tileNum].blockmask |= BLOCKMASK_WATER;
break;
+ case BLOCKTYPE_GROUND:
+ mMetaTiles[tileNum].blockmask |= BLOCKMASK_GROUND;
+ break;
default:
case BLOCKTYPE_NONE:
case NB_BLOCKTYPES:
@@ -1364,7 +1367,7 @@ void Map::addExtraLayer()
return;
}
char line[201];
- std::string buf;
+
while (mapFile.getline(line, 200))
{
std::string buf;
diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp
index c9862cd53..3ce30ce84 100644
--- a/src/net/tmwa/chathandler.cpp
+++ b/src/net/tmwa/chathandler.cpp
@@ -244,7 +244,6 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
if (!being || chatMsgLength <= 0)
break;
- std::string str2;
chatMsg = msg.readRawString(chatMsgLength);
if (being->getType() == Being::PLAYER)
@@ -293,7 +292,6 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
if (chatMsgLength <= 0)
break;
- std::string str2;
chatMsg = msg.readRawString(chatMsgLength);
std::string::size_type pos = chatMsg.find(" : ", 0);
@@ -301,8 +299,6 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
{
if (chatWindow)
chatWindow->resortChatLog(chatMsg, BY_PLAYER);
-// if (localChatTab)
-// localChatTab->chatLog(chatMsg, BY_PLAYER);
const std::string senseStr = "You sense the following: ";
if (actorSpriteManager && !chatMsg.find(senseStr))