summaryrefslogtreecommitdiff
path: root/src/gui/window.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-03-26 09:55:21 -0600
committerIra Rice <irarice@gmail.com>2009-03-26 09:55:21 -0600
commitf883ad28b77a499fa66497158db425ce1db50f78 (patch)
tree47156bc38c68130d1fb83f8d83b2543375d17d1a /src/gui/window.cpp
parent58eb615a589cd6444092f9c928f26210087aa78b (diff)
downloadmana-client-f883ad28b77a499fa66497158db425ce1db50f78.tar.gz
mana-client-f883ad28b77a499fa66497158db425ce1db50f78.tar.bz2
mana-client-f883ad28b77a499fa66497158db425ce1db50f78.tar.xz
mana-client-f883ad28b77a499fa66497158db425ce1db50f78.zip
Some code cleanups (mostly reducing how many calculations need to be
done in certain statements, rearranging arguements to make them look cleaner, or overall making the code slightly more flexible) Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r--src/gui/window.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index 642fdeb8..f64f1caf 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -20,9 +20,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <cassert>
-#include <climits>
-
#include <guichan/exception.hpp>
#include "gui.h"
@@ -55,8 +52,8 @@ Window::Window(const std::string& caption, bool modal, Window *parent, const std
mSticky(false),
mMinWinWidth(100),
mMinWinHeight(40),
- mMaxWinWidth(INT_MAX),
- mMaxWinHeight(INT_MAX)
+ mMaxWinWidth(graphics->getWidth()),
+ mMaxWinHeight(graphics->getHeight())
{
logger->log("Window::Window(\"%s\")", caption.c_str());
@@ -64,9 +61,7 @@ Window::Window(const std::string& caption, bool modal, Window *parent, const std
throw GCN_EXCEPTION("Window::Window(): no windowContainer set");
if (instances == 0)
- {
skinLoader = new SkinLoader();
- }
instances++;
@@ -114,9 +109,7 @@ Window::~Window()
mSkin->instances--;
if (instances == 0)
- {
delete skinLoader;
- }
}
void Window::setWindowContainer(WindowContainer *wc)