Skip to content

Instantly share code, notes, and snippets.

@celeron55
Created July 17, 2017 09:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save celeron55/d8226b2f0c540dc9feae30ccf0d99e65 to your computer and use it in GitHub Desktop.
Save celeron55/d8226b2f0c540dc9feae30ccf0d99e65 to your computer and use it in GitHub Desktop.
diff --git a/src/serverobject.h b/src/serverobject.h
index cd1922c..41079c1 100644
--- a/src/serverobject.h
+++ b/src/serverobject.h
@@ -148,7 +148,7 @@ class ServerActiveObject : public ActiveObject
virtual void setArmorGroups(const ItemGroupList &armor_groups)
{}
virtual const ItemGroupList &getArmorGroups()
- { static const ItemGroupList rv; return rv; }
+ { static const ItemGroupList rv = {}; return rv; }
virtual void setPhysicsOverride(float physics_override_speed, float physics_override_jump, float physics_override_gravity)
{}
virtual void setAnimation(v2f frames, float frame_speed, float frame_blend, bool frame_loop)
@@ -168,7 +168,7 @@ class ServerActiveObject : public ActiveObject
virtual void removeAttachmentChild(int child_id)
{}
virtual const std::unordered_set<int> &getAttachmentChildIds()
- { static const std::unordered_set<int> rv; return rv; }
+ { static const std::unordered_set<int> rv = {}; return rv; }
virtual ObjectProperties* accessObjectProperties()
{ return NULL; }
virtual void notifyObjectPropertiesModified()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment