summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/botcheckerwindow.cpp2
-rw-r--r--src/gui/buyselldialog.h4
-rw-r--r--src/gui/debugwindow.h8
-rw-r--r--src/gui/inventorywindow.h2
-rw-r--r--src/gui/logindialog.cpp2
-rw-r--r--src/gui/setup_relations.cpp2
-rw-r--r--src/gui/socialwindow.cpp2
-rw-r--r--src/gui/whoisonline.cpp5
-rw-r--r--src/gui/widgets/chattab.cpp2
-rw-r--r--src/gui/widgets/guildchattab.h2
-rw-r--r--src/gui/worldselectdialog.cpp4
11 files changed, 16 insertions, 19 deletions
diff --git a/src/gui/botcheckerwindow.cpp b/src/gui/botcheckerwindow.cpp
index 458da93c9..ec6125db4 100644
--- a/src/gui/botcheckerwindow.cpp
+++ b/src/gui/botcheckerwindow.cpp
@@ -62,7 +62,7 @@ class UsersTableModel final : public TableModel,
public Widget2
{
public:
- UsersTableModel(const Widget2 *const widget) :
+ explicit UsersTableModel(const Widget2 *const widget) :
TableModel(),
Widget2(widget),
mPlayers(0)
diff --git a/src/gui/buyselldialog.h b/src/gui/buyselldialog.h
index d6cef9192..371e8bdd9 100644
--- a/src/gui/buyselldialog.h
+++ b/src/gui/buyselldialog.h
@@ -43,9 +43,9 @@ class BuySellDialog final : public Window, public gcn::ActionListener
*
* @see Window::Window
*/
- BuySellDialog(const int npcId);
+ explicit BuySellDialog(const int npcId);
- BuySellDialog(std::string nick);
+ explicit BuySellDialog(std::string nick);
A_DELETE_COPY(BuySellDialog)
diff --git a/src/gui/debugwindow.h b/src/gui/debugwindow.h
index 14265a6cc..7fd94f990 100644
--- a/src/gui/debugwindow.h
+++ b/src/gui/debugwindow.h
@@ -37,7 +37,7 @@ class DebugTab : public Container
friend class DebugWindow;
public:
- DebugTab(const Widget2 *const widget) :
+ explicit DebugTab(const Widget2 *const widget) :
Container(widget)
{ }
@@ -56,7 +56,7 @@ class MapDebugTab final : public DebugTab
friend class DebugWindow;
public:
- MapDebugTab(const Widget2 *const widget);
+ explicit MapDebugTab(const Widget2 *const widget);
A_DELETE_COPY(MapDebugTab)
@@ -85,7 +85,7 @@ class TargetDebugTab final : public DebugTab
friend class DebugWindow;
public:
- TargetDebugTab(const Widget2 *const widget);
+ explicit TargetDebugTab(const Widget2 *const widget);
A_DELETE_COPY(TargetDebugTab)
@@ -110,7 +110,7 @@ class NetDebugTab final : public DebugTab
friend class DebugWindow;
public:
- NetDebugTab(const Widget2 *const widget);
+ explicit NetDebugTab(const Widget2 *const widget);
A_DELETE_COPY(NetDebugTab)
diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h
index b6bcbd304..83e26948b 100644
--- a/src/gui/inventorywindow.h
+++ b/src/gui/inventorywindow.h
@@ -62,7 +62,7 @@ class InventoryWindow final : public Window,
/**
* Constructor.
*/
- InventoryWindow(Inventory *const inventory);
+ explicit InventoryWindow(Inventory *const inventory);
A_DELETE_COPY(InventoryWindow)
diff --git a/src/gui/logindialog.cpp b/src/gui/logindialog.cpp
index d5cfd7ca7..f1f8bc200 100644
--- a/src/gui/logindialog.cpp
+++ b/src/gui/logindialog.cpp
@@ -98,7 +98,7 @@ class UpdateTypeModel final : public gcn::ListModel
class UpdateListModel final : public gcn::ListModel
{
public:
- UpdateListModel(LoginData *const data) :
+ explicit UpdateListModel(LoginData *const data) :
gcn::ListModel(),
mLoginData(data)
{
diff --git a/src/gui/setup_relations.cpp b/src/gui/setup_relations.cpp
index 5387b0aab..77aa3b1b9 100644
--- a/src/gui/setup_relations.cpp
+++ b/src/gui/setup_relations.cpp
@@ -94,7 +94,7 @@ public:
class PlayerTableModel final : public Widget2, public TableModel
{
public:
- PlayerTableModel(const Widget2 *const widget) :
+ explicit PlayerTableModel(const Widget2 *const widget) :
Widget2(widget),
TableModel(),
mPlayers(nullptr),
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp
index 6514f5922..dde6b30f2 100644
--- a/src/gui/socialwindow.cpp
+++ b/src/gui/socialwindow.cpp
@@ -99,7 +99,7 @@ public:
protected:
friend class SocialWindow;
- SocialTab(const Widget2 *const widget):
+ explicit SocialTab(const Widget2 *const widget):
Tab(widget),
mInviteDialog(nullptr),
mConfirmDialog(nullptr),
diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp
index 84f0fd2f5..6a5ae8f70 100644
--- a/src/gui/whoisonline.cpp
+++ b/src/gui/whoisonline.cpp
@@ -490,15 +490,12 @@ int WhoIsOnline::downloadThread(void *ptr)
{
int attempts = 0;
WhoIsOnline *wio = reinterpret_cast<WhoIsOnline *>(ptr);
- CURL *curl;
CURLcode res;
-
std::string url(Client::getServerName() + "/online.txt");
while (attempts < 1 && !wio->mDownloadComplete)
{
- curl = curl_easy_init();
-
+ CURL *curl = curl_easy_init();
if (curl)
{
if (!wio->mAllowUpdate)
diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp
index 9d936755c..fc3e4e69f 100644
--- a/src/gui/widgets/chattab.cpp
+++ b/src/gui/widgets/chattab.cpp
@@ -459,9 +459,9 @@ int ChatTab::getType() const
void ChatTab::addRow(std::string &line)
{
- size_t idx = 0;
if (line.find("[@@http") == std::string::npos)
{
+ size_t idx = 0;
for (size_t f = 0; f < line.length(); f++)
{
if (line.at(f) == ' ')
diff --git a/src/gui/widgets/guildchattab.h b/src/gui/widgets/guildchattab.h
index c1605495d..6daada229 100644
--- a/src/gui/widgets/guildchattab.h
+++ b/src/gui/widgets/guildchattab.h
@@ -31,7 +31,7 @@
class GuildChatTab final : public ChatTab, public ConfigListener
{
public:
- GuildChatTab(const Widget2 *const widget);
+ explicit GuildChatTab(const Widget2 *const widget);
A_DELETE_COPY(GuildChatTab)
diff --git a/src/gui/worldselectdialog.cpp b/src/gui/worldselectdialog.cpp
index b62311555..efdc7ba4b 100644
--- a/src/gui/worldselectdialog.cpp
+++ b/src/gui/worldselectdialog.cpp
@@ -49,8 +49,8 @@ extern WorldInfo **server_info;
class WorldListModel final : public gcn::ListModel
{
public:
- WorldListModel(Worlds worlds):
- mWorlds(worlds)
+ explicit WorldListModel(Worlds worlds) :
+ mWorlds(worlds)
{
}