summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/skin.cpp4
-rw-r--r--src/gui/skin.h4
-rw-r--r--src/gui/trade.cpp2
-rw-r--r--src/gui/window.cpp13
-rw-r--r--src/gui/window.h21
-rw-r--r--src/net/ea/skillhandler.cpp2
6 files changed, 21 insertions, 25 deletions
diff --git a/src/gui/skin.cpp b/src/gui/skin.cpp
index 27a0fa3d..f7cc8ba1 100644
--- a/src/gui/skin.cpp
+++ b/src/gui/skin.cpp
@@ -51,13 +51,13 @@ Skin::~Skin()
closeImage->decRef();
}
-unsigned int Skin::getMinWidth()
+int Skin::getMinWidth() const
{
return (border.grid[0]->getWidth() + border.grid[1]->getWidth()) +
border.grid[2]->getWidth();
}
-unsigned int Skin::getMinHeight()
+int Skin::getMinHeight() const
{
return (border.grid[0]->getHeight() + border.grid[3]->getHeight()) +
border.grid[6]->getHeight();
diff --git a/src/gui/skin.h b/src/gui/skin.h
index b8a1242e..21bd84f2 100644
--- a/src/gui/skin.h
+++ b/src/gui/skin.h
@@ -60,12 +60,12 @@ class Skin
/**
* Returns the minimum width which can be used with this skin.
*/
- unsigned int getMinWidth();
+ int getMinWidth() const;
/**
* Returns the minimum height which can be used with this skin.
*/
- unsigned int getMinHeight();
+ int getMinHeight() const;
int instances;
diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp
index 2ba076a3..a95e1d43 100644
--- a/src/gui/trade.cpp
+++ b/src/gui/trade.cpp
@@ -277,7 +277,7 @@ void TradeWindow::valueChanged(const gcn::SelectionEvent &event)
if (event.getSource() == mMyItemContainer &&
(item = mMyItemContainer->getSelectedItem()))
mPartnerItemContainer->selectNone();
- else if (item = mPartnerItemContainer->getSelectedItem())
+ else if ((item = mPartnerItemContainer->getSelectedItem()))
mMyItemContainer->selectNone();
}
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index 83354a07..0a5c3b13 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -255,23 +255,23 @@ void Window::setLocationRelativeTo(ImageRect::ImagePosition position,
setPosition(offsetX, offsetY);
}
-void Window::setMinWidth(unsigned int width)
+void Window::setMinWidth(int width)
{
mMinWinWidth = width > mSkin->getMinWidth() ? width : mSkin->getMinWidth();
}
-void Window::setMinHeight(unsigned int height)
+void Window::setMinHeight(int height)
{
mMinWinHeight = height > mSkin->getMinHeight() ?
height : mSkin->getMinHeight();
}
-void Window::setMaxWidth(unsigned int width)
+void Window::setMaxWidth(int width)
{
mMaxWinWidth = width;
}
-void Window::setMaxHeight(unsigned int height)
+void Window::setMaxHeight(int height)
{
mMaxWinHeight = height;
}
@@ -326,11 +326,6 @@ void Window::setSticky(bool sticky)
mSticky = sticky;
}
-bool Window::isSticky()
-{
- return mSticky;
-}
-
void Window::setVisible(bool visible)
{
gcn::Window::setVisible(isSticky() || visible);
diff --git a/src/gui/window.h b/src/gui/window.h
index 7f15e262..44128f1d 100644
--- a/src/gui/window.h
+++ b/src/gui/window.h
@@ -117,42 +117,42 @@ class Window : public gcn::Window, gcn::WidgetListener
/**
* Sets the minimum width of the window.
*/
- void setMinWidth(unsigned int width);
+ void setMinWidth(int width);
/**
* Sets the minimum height of the window.
*/
- void setMinHeight(unsigned int height);
+ void setMinHeight(int height);
/**
* Sets the maximum width of the window.
*/
- void setMaxWidth(unsigned int width);
+ void setMaxWidth(int width);
/**
* Sets the minimum height of the window.
*/
- void setMaxHeight(unsigned int height);
+ void setMaxHeight(int height);
/**
* Gets the minimum width of the window.
*/
- int getMinWidth() { return mMinWinWidth; }
+ int getMinWidth() const { return mMinWinWidth; }
/**
* Gets the minimum height of the window.
*/
- int getMinHeight() { return mMinWinHeight; }
+ int getMinHeight() const { return mMinWinHeight; }
/**
* Gets the maximum width of the window.
*/
- int getMaxWidth() { return mMaxWinWidth; }
+ int getMaxWidth() const { return mMaxWinWidth; }
/**
* Gets the minimum height of the window.
*/
- int getMaxHeight() { return mMaxWinHeight; }
+ int getMaxHeight() const { return mMaxWinHeight; }
/**
* Sets flag to show a title or not.
@@ -168,7 +168,8 @@ class Window : public gcn::Window, gcn::WidgetListener
/**
* Returns whether the window is sticky.
*/
- bool isSticky();
+ bool isSticky() const
+ { return mSticky; }
/**
* Overloads window setVisible by Guichan to allow sticky window
@@ -181,7 +182,7 @@ class Window : public gcn::Window, gcn::WidgetListener
*
* @return The parent window or <code>NULL</code> if there is none.
*/
- Window *getParentWindow() { return mParent; }
+ Window *getParentWindow() const { return mParent; }
/**
* Schedule this window for deletion. It will be deleted at the start
diff --git a/src/net/ea/skillhandler.cpp b/src/net/ea/skillhandler.cpp
index 12c38aaa..c3f4ffec 100644
--- a/src/net/ea/skillhandler.cpp
+++ b/src/net/ea/skillhandler.cpp
@@ -112,7 +112,7 @@ void SkillHandler::handleMessage(MessageIn &msg)
// right level)
short skill = msg.readInt16();
short bskill = msg.readInt16();
- short unused = msg.readInt16(); // unknown
+ msg.readInt16(); // unknown
char success = msg.readInt8();
char reason = msg.readInt8();
if (success != SKILL_FAILED && bskill == BSKILL_EMOTE)