From 65b066f18e835d7cba57bea84fc5b244ad5e5b90 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 26 Jun 2022 13:18:00 -0600 Subject: [PATCH] [glyf/path-builder] Simplify initialization --- src/OT/glyf/path-builder.hh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/OT/glyf/path-builder.hh b/src/OT/glyf/path-builder.hh index ba595b664..6496ed422 100644 --- a/src/OT/glyf/path-builder.hh +++ b/src/OT/glyf/path-builder.hh @@ -16,12 +16,12 @@ struct path_builder_t struct optional_point_t { - optional_point_t () { has_data = false; } - optional_point_t (float x_, float y_) { x = x_; y = y_; has_data = true; } + optional_point_t () {} + optional_point_t (float x_, float y_) : has_data (true), x (x_), y (y_) {} - bool has_data; - float x; - float y; + bool has_data = false; + float x = 0.; + float y = 0.; optional_point_t lerp (optional_point_t p, float t) { return optional_point_t (x + t * (p.x - x), y + t * (p.y - y)); }