From 6d112a68b685cde609d0d90b2c57f2db6a7b9df6 Mon Sep 17 00:00:00 2001 From: "Wilson E. Alvarez" Date: Sun, 30 Jul 2017 19:07:04 -0400 Subject: Moved member variables from constructor to initialization list --- scene/2d/navigation2d.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scene/2d') diff --git a/scene/2d/navigation2d.h b/scene/2d/navigation2d.h index e5d71f48c3..54e89de9e2 100644 --- a/scene/2d/navigation2d.h +++ b/scene/2d/navigation2d.h @@ -57,9 +57,9 @@ class Navigation2D : public Node2D { return (a.key == p_key.a.key) ? (b.key < p_key.b.key) : (a.key < p_key.a.key); }; - EdgeKey(const Point &p_a = Point(), const Point &p_b = Point()) { - a = p_a; - b = p_b; + EdgeKey(const Point &p_a = Point(), const Point &p_b = Point()) + : a(p_a), + b(p_b) { if (a.key > b.key) { SWAP(a, b); } -- cgit v1.2.3