aboutsummaryrefslogtreecommitdiff
path: root/src/staticobject.h
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2020-11-04 16:19:54 +0100
committerElias Fleckenstein <eliasfleckenstein@web.de>2020-11-04 16:19:54 +0100
commitad148587dcf5244c2d2011dba339786c765c54c4 (patch)
treebdd914121cd326da2ed26679838878e3edffc841 /src/staticobject.h
parent1145b05ea0bda87dc0827821385810eced08f774 (diff)
downloaddragonfireclient-ad148587dcf5244c2d2011dba339786c765c54c4.tar.xz
Make Lint Happy
Diffstat (limited to 'src/staticobject.h')
-rw-r--r--src/staticobject.h21
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);