summaryrefslogtreecommitdiff
path: root/src/resources/npcdb.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-03-02 12:55:32 +0000
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-03-02 12:55:32 +0000
commit5efaa5125fe92a5438b3cc2949f4d720bced5a7a (patch)
tree87f4da1382fb6179610182ca3e502e5365e66276 /src/resources/npcdb.cpp
parent2e60491ceb0548b0bea93207c13b974d6a6cf5cc (diff)
downloadmana-5efaa5125fe92a5438b3cc2949f4d720bced5a7a.tar.gz
mana-5efaa5125fe92a5438b3cc2949f4d720bced5a7a.tar.bz2
mana-5efaa5125fe92a5438b3cc2949f4d720bced5a7a.tar.xz
mana-5efaa5125fe92a5438b3cc2949f4d720bced5a7a.zip
General code cleanups
* Don't needlessly store or return raw pointers in BeingInfo * Less copying, more moving * Less else after return * Make AddDEF a template instead of a macro * Removed some unused includes * Use range-based for loops
Diffstat (limited to 'src/resources/npcdb.cpp')
-rw-r--r--src/resources/npcdb.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/resources/npcdb.cpp b/src/resources/npcdb.cpp
index fa12eced..6a0685d2 100644
--- a/src/resources/npcdb.cpp
+++ b/src/resources/npcdb.cpp
@@ -27,7 +27,6 @@
#include "utils/dtor.h"
#include "utils/xml.h"
-#include "configuration.h"
namespace
{
@@ -40,7 +39,6 @@ void NPCDB::init()
{
if (mLoaded)
unload();
-
}
void NPCDB::readNPCNode(xmlNodePtr node, const std::string &filename)
@@ -101,8 +99,6 @@ BeingInfo *NPCDB::get(int id)
logger->log("NPCDB: Warning, unknown NPC ID %d requested", id);
return BeingInfo::Unknown;
}
- else
- {
- return i->second;
- }
+
+ return i->second;
}