From 1f86208163fea0d7013d930ddd7c0f6497d630da 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 56b2fcc..2d59740 100644 --- a/src/Arduboy2.h +++ b/src/Arduboy2.h @@ -121,6 +121,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 */ + + Point(int16_t x, int16_t y); /**< The fully initialising constructor */ }; //==================================