diff options
author | Elias Fleckenstein <54945686+EliasFleckenstein03@users.noreply.github.com> | 2020-11-04 16:44:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-04 16:44:42 +0100 |
commit | 5d9ae5a91c544fc7fbd475decf47cef7e09ef8fc (patch) | |
tree | c980d614fec4a5495798be3e79e033229062c3cd /src/staticobject.h | |
parent | 28f6a79706b088c37268a59d90878220dc4ef9c7 (diff) | |
parent | 3af10766fd2b58b068e970266724d7eb10e9316b (diff) | |
download | dragonfireclient-5d9ae5a91c544fc7fbd475decf47cef7e09ef8fc.tar.xz |
Merge branch 'master' into master
Diffstat (limited to 'src/staticobject.h')
-rw-r--r-- | src/staticobject.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/staticobject.h b/src/staticobject.h index 6fb486193..fd1b78315 100644 --- a/src/staticobject.h +++ b/src/staticobject.h @@ -50,16 +50,12 @@ 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; @@ -69,10 +65,9 @@ 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); |