From 9e1e20cbb0764d4b425ec349f950d533cdacedc5 Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 30 May 2018 03:24:04 -0700 Subject: [PATCH] Replace boolean type with bool in examples This is part of a move to encourage use of the standard bool type over Arduino's non-standard boolean type alias. --- examples/Arduino/TFTPong/TFTPong.ino | 4 ++-- examples/Esplora/EsploraTFTPong/EsploraTFTPong.ino | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/Arduino/TFTPong/TFTPong.ino b/examples/Arduino/TFTPong/TFTPong.ino index 7a61915..f03ee29 100644 --- a/examples/Arduino/TFTPong/TFTPong.ino +++ b/examples/Arduino/TFTPong/TFTPong.ino @@ -121,8 +121,8 @@ void moveBall() { // this function checks the position of the ball // to see if it intersects with the paddle -boolean inPaddle(int x, int y, int rectX, int rectY, int rectWidth, int rectHeight) { - boolean result = false; +bool inPaddle(int x, int y, int rectX, int rectY, int rectWidth, int rectHeight) { + bool result = false; if ((x >= rectX && x <= (rectX + rectWidth)) && (y >= rectY && y <= (rectY + rectHeight))) { diff --git a/examples/Esplora/EsploraTFTPong/EsploraTFTPong.ino b/examples/Esplora/EsploraTFTPong/EsploraTFTPong.ino index 11b1dff..b5d837f 100644 --- a/examples/Esplora/EsploraTFTPong/EsploraTFTPong.ino +++ b/examples/Esplora/EsploraTFTPong/EsploraTFTPong.ino @@ -114,8 +114,8 @@ void moveBall() { // this function checks the position of the ball // to see if it intersects with the paddle -boolean inPaddle(int x, int y, int rectX, int rectY, int rectWidth, int rectHeight) { - boolean result = false; +bool inPaddle(int x, int y, int rectX, int rectY, int rectWidth, int rectHeight) { + bool result = false; if ((x >= rectX && x <= (rectX + rectWidth)) && (y >= rectY && y <= (rectY + rectHeight))) {