summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-06-18 04:13:26 +0300
committerAndrei Karas <akaras@inbox.ru>2018-06-18 04:13:26 +0300
commitbc05e688174d24f3b2b01ee0ab5ce73787817832 (patch)
tree93de6e980b161e7dccec2acf98b4621c6c385369
parent5e11fb3595e752e37557e3e1a1a0590e033daad3 (diff)
downloadmv-bc05e688174d24f3b2b01ee0ab5ce73787817832.tar.gz
mv-bc05e688174d24f3b2b01ee0ab5ce73787817832.tar.bz2
mv-bc05e688174d24f3b2b01ee0ab5ce73787817832.tar.xz
mv-bc05e688174d24f3b2b01ee0ab5ce73787817832.zip
Fix some style issues after automatic checks.
-rw-r--r--src/net/eathena/npchandler.cpp2
-rw-r--r--src/net/tmwa/npchandler.cpp3
-rw-r--r--src/progs/manaplus/client.cpp2
-rw-r--r--src/resources/db/groupdb.cpp2
-rw-r--r--src/resources/mapreader.cpp6
5 files changed, 6 insertions, 9 deletions
diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp
index 7ec80433a..9a0054b6a 100644
--- a/src/net/eathena/npchandler.cpp
+++ b/src/net/eathena/npchandler.cpp
@@ -327,10 +327,10 @@ BeingId NpcHandler::getNpc(Net::MessageIn &msg,
const BeingId npcId = msg.readBeingId("npc id");
const NpcDialogs::const_iterator diag = NpcDialog::mNpcDialogs.find(npcId);
- Ea::NpcRecv::mDialog = nullptr;
if (diag == NpcDialog::mNpcDialogs.end())
{
+ Ea::NpcRecv::mDialog = nullptr;
// Empty dialogs don't help
if (action == NpcAction::Close)
{
diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp
index c577bc6a1..df9f40219 100644
--- a/src/net/tmwa/npchandler.cpp
+++ b/src/net/tmwa/npchandler.cpp
@@ -206,11 +206,10 @@ BeingId NpcHandler::getNpc(Net::MessageIn &msg,
const BeingId npcId = msg.readBeingId("npc id");
const NpcDialogs::const_iterator diag = NpcDialog::mNpcDialogs.find(npcId);
- Ea::NpcRecv::mDialog = nullptr;
if (diag == NpcDialog::mNpcDialogs.end())
{
- // +++ must be removed packet id checks from here
+ Ea::NpcRecv::mDialog = nullptr;
// Empty dialogs don't help
if (action == NpcAction::Close)
{
diff --git a/src/progs/manaplus/client.cpp b/src/progs/manaplus/client.cpp
index 22d2bc483..f9f608102 100644
--- a/src/progs/manaplus/client.cpp
+++ b/src/progs/manaplus/client.cpp
@@ -304,7 +304,7 @@ void Client::gameInit()
#ifndef ENABLE_COMMANDLINEPASSWORD
if (!settings.options.password.empty())
{
- settings.options.password = std::string();
+ settings.options.password.clear();
logger->log("Command line password parameter disabled.");
}
#endif
diff --git a/src/resources/db/groupdb.cpp b/src/resources/db/groupdb.cpp
index 1102b7ec4..a8b75d39f 100644
--- a/src/resources/db/groupdb.cpp
+++ b/src/resources/db/groupdb.cpp
@@ -410,8 +410,6 @@ bool GroupDb::isAllowCommand(const ServerCommandTypeT command)
{
const int groupId = localPlayer->getGroupId();
const GroupInfo *const group = GroupDb::getGroup(groupId);
- if (group == nullptr)
- return false;
#ifdef TMWA_SUPPORT
// allow any commands for legacy if group > 0
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 9393e781b..74059a034 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -1120,11 +1120,11 @@ Tileset *MapReader::readTileset(XmlNodePtr node,
const std::string source = XML::getProperty(
childNode, "source", "");
- const std::string sourceResolved = resolveRelativePath(pathDir,
- source);
-
if (!source.empty())
{
+ const std::string sourceResolved = resolveRelativePath(pathDir,
+ source);
+
Image *const tilebmp = Loader::getImage(sourceResolved);
if (tilebmp != nullptr)