summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/botcheckerwindow.h4
-rw-r--r--src/gui/chatwindow.h4
-rw-r--r--src/gui/sdlfont.cpp3
-rw-r--r--src/gui/serverdialog.cpp6
-rw-r--r--src/gui/textdialog.cpp4
5 files changed, 10 insertions, 11 deletions
diff --git a/src/gui/botcheckerwindow.h b/src/gui/botcheckerwindow.h
index 36ca41a24..7bc75e2fb 100644
--- a/src/gui/botcheckerwindow.h
+++ b/src/gui/botcheckerwindow.h
@@ -33,8 +33,8 @@
struct BOTCHK final
{
- short id; /**< Index into "botchecker_db" array */
- short lv, sp;
+ int16_t id; /**< Index into "botchecker_db" array */
+ int16_t lv, sp;
};
class Button;
diff --git a/src/gui/chatwindow.h b/src/gui/chatwindow.h
index 2961d7de4..f658a7757 100644
--- a/src/gui/chatwindow.h
+++ b/src/gui/chatwindow.h
@@ -354,8 +354,8 @@ class ChatWindow final : public Window,
History mCommands; /**< Command list. */
History mCustomWords;
- bool mReturnToggles; // Marks whether <Return> toggles the chat log
- // or not
+ bool mReturnToggles; // Marks whether <Return> toggles the chat log
+ // or not
StringVect mTradeFilter;
diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp
index f3d904059..1acb50720 100644
--- a/src/gui/sdlfont.cpp
+++ b/src/gui/sdlfont.cpp
@@ -245,8 +245,7 @@ void SDLFont::loadFont(std::string filename, const int size, const int style)
void SDLFont::clear()
{
- for (unsigned short f = 0; f < static_cast<unsigned short>(
- CACHES_NUMBER); f ++)
+ for (size_t f = 0; f < CACHES_NUMBER; f ++)
{
mCache[f].clear();
}
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index ee879f2a8..56ce6528a 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -86,7 +86,7 @@ static std::string serverTypeToString(const ServerInfo::Type type)
}
}
-static unsigned short defaultPortForServerType(const ServerInfo::Type type)
+static uint16_t defaultPortForServerType(const ServerInfo::Type type)
{
switch (type)
{
@@ -616,7 +616,7 @@ void ServerDialog::loadServers(const bool addNew)
if (xmlNameEqual(subNode, "connection"))
{
server.hostname = XML::getProperty(subNode, "hostname", "");
- server.port = static_cast<short unsigned>(
+ server.port = static_cast<uint16_t>(
XML::getProperty(subNode, "port", 0));
if (server.port == 0)
@@ -685,7 +685,7 @@ void ServerDialog::loadCustomServers()
server.type = ServerInfo::parseType(config.getValue(typeKey, ""));
const int defaultPort = defaultPortForServerType(server.type);
- server.port = static_cast<unsigned short>(
+ server.port = static_cast<uint16_t>(
config.getValue(portKey, defaultPort));
// skip invalid server
diff --git a/src/gui/textdialog.cpp b/src/gui/textdialog.cpp
index d598cb37c..146bcede5 100644
--- a/src/gui/textdialog.cpp
+++ b/src/gui/textdialog.cpp
@@ -70,11 +70,11 @@ TextDialog::TextDialog(const std::string &title, const std::string &msg,
int width = font->getWidth(title);
if (width < textLabel->getWidth())
width = textLabel->getWidth();
- reflowLayout(static_cast<short>(width + 20));
+ reflowLayout(static_cast<int>(width + 20));
}
else
{
- reflowLayout(static_cast<short>(textLabel->getWidth() + 20));
+ reflowLayout(static_cast<int>(textLabel->getWidth() + 20));
}
if (getParent())