From 2427e7c86b95b96bc9cf7d90fa1aa140fff29a24 Mon Sep 17 00:00:00 2001 From: Pharap <2933055+Pharap@users.noreply.github.com> Date: Tue, 10 Jul 2018 16:25:33 +0100 Subject: [PATCH] Add constructors to Point --- src/Arduboy2.cpp | 9 +++++++++ src/Arduboy2.h | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/src/Arduboy2.cpp b/src/Arduboy2.cpp index 40869e7..d6cdcd4 100644 --- a/src/Arduboy2.cpp +++ b/src/Arduboy2.cpp @@ -17,6 +17,15 @@ Rect::Rect(int16_t x, int16_t y, uint8_t width, uint8_t height) { } +//================================= +//========== class Point ========== +//================================= + +Point::Point(int16_t x, int16_t y) + : x(x), y(y) +{ +} + //======================================== //========== class Arduboy2Base ========== //======================================== diff --git a/src/Arduboy2.h b/src/Arduboy2.h index 71a0c46..735e592 100644 --- a/src/Arduboy2.h +++ b/src/Arduboy2.h @@ -122,6 +122,10 @@ struct Point { int16_t x; /**< The X coordinate of the point */ int16_t y; /**< The Y coordinate of the point */ + + Point() = default; /**< The default constructor of the point */ + + Point(int16_t x, int16_t y); /**< The fully initialising constructor of the point */ }; //==================================