aboutsummaryrefslogtreecommitdiff
path: root/src/staticobject.h
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2020-11-04 16:57:41 +0100
committerElias Fleckenstein <eliasfleckenstein@web.de>2020-11-04 16:57:41 +0100
commit6ccb5835ff55d85156be91473c598eca9d6cb9a6 (patch)
tree7f1eaf8b94694c8e24e206909ba8f55a1ebfbb3e /src/staticobject.h
parent244713971a976e43e8740b6a9d9d122e37020ef2 (diff)
downloaddragonfireclient-6ccb5835ff55d85156be91473c598eca9d6cb9a6.tar.xz
Revert "Make Lint Happy"
This reverts commit ad148587dcf5244c2d2011dba339786c765c54c4.
Diffstat (limited to 'src/staticobject.h')
-rw-r--r--src/staticobject.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/staticobject.h b/src/staticobject.h
index fd1b78315..6fb486193 100644
--- a/src/staticobject.h
+++ b/src/staticobject.h
@@ -50,12 +50,16 @@ public:
*/
void insert(u16 id, const StaticObject &obj)
{
- if (id == 0) {
+ if(id == 0)
+ {
m_stored.push_back(obj);
- } else {
- if (m_active.find(id) != m_active.end()) {
- dstream << "ERROR: StaticObjectList::insert(): "
- << "id already exists" << std::endl;
+ }
+ else
+ {
+ if(m_active.find(id) != m_active.end())
+ {
+ dstream<<"ERROR: StaticObjectList::insert(): "
+ <<"id already exists"<<std::endl;
FATAL_ERROR("StaticObjectList::insert()");
}
m_active[id] = obj;
@@ -65,9 +69,10 @@ public:
void remove(u16 id)
{
assert(id != 0); // Pre-condition
- if (m_active.find(id) == m_active.end()) {
- warningstream << "StaticObjectList::remove(): id=" << id
- << " not found" << std::endl;
+ if(m_active.find(id) == m_active.end())
+ {
+ warningstream<<"StaticObjectList::remove(): id="<<id
+ <<" not found"<<std::endl;
return;
}
m_active.erase(id);