diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-11-04 16:57:41 +0100 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-11-04 16:57:41 +0100 |
commit | 6ccb5835ff55d85156be91473c598eca9d6cb9a6 (patch) | |
tree | 7f1eaf8b94694c8e24e206909ba8f55a1ebfbb3e /src/staticobject.h | |
parent | 244713971a976e43e8740b6a9d9d122e37020ef2 (diff) | |
download | dragonfireclient-6ccb5835ff55d85156be91473c598eca9d6cb9a6.tar.xz |
Revert "Make Lint Happy"
This reverts commit ad148587dcf5244c2d2011dba339786c765c54c4.
Diffstat (limited to 'src/staticobject.h')
-rw-r--r-- | src/staticobject.h | 21 |
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); |