summaryrefslogtreecommitdiff
path: root/src/collision.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-08-17 20:23:54 +0200
committerGitHub <noreply@github.com>2017-08-17 20:23:54 +0200
commitc738d1eeabbbe9164a25f6b69bc7ec1a3b44b051 (patch)
tree6a7c153cd4e1f468c627ab5811e76fc7c77f9a44 /src/collision.h
parent9bd18874a14774f2585955719b77f8894d6e6618 (diff)
downloadminetest-c738d1eeabbbe9164a25f6b69bc7ec1a3b44b051.tar.gz
minetest-c738d1eeabbbe9164a25f6b69bc7ec1a3b44b051.tar.bz2
minetest-c738d1eeabbbe9164a25f6b69bc7ec1a3b44b051.zip
clientobject, clouds, collision, clientsimpleobject: code modernization (#6260)
* clientobject, clouds, collision, clientsimpleobject: code modernization * use range-based for loops * simplify some tests * various code style fixes * use emplace_back instead of push_back when necessary * use auto on some iterators * use default operator when needed * unroll v3s16 creation on collisionMoveSimple
Diffstat (limited to 'src/collision.h')
-rw-r--r--src/collision.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/collision.h b/src/collision.h
index 50755224b..d72c6d62f 100644
--- a/src/collision.h
+++ b/src/collision.h
@@ -36,7 +36,8 @@ enum CollisionType
struct CollisionInfo
{
- CollisionInfo() {}
+ CollisionInfo() = default;
+
CollisionType type = COLLISION_NODE;
v3s16 node_p = v3s16(-32768,-32768,-32768); // COLLISION_NODE
v3f old_speed;
@@ -45,7 +46,8 @@ struct CollisionInfo
struct collisionMoveResult
{
- collisionMoveResult() {}
+ collisionMoveResult() = default;
+
bool touching_ground = false;
bool collides = false;
bool standing_on_object = false;