From feb26d726965d5cfc6601171948ea65f740195f3 Mon Sep 17 00:00:00 2001 From: Markus Ransberger Date: Sun, 21 Jul 2024 19:30:06 +0200 Subject: [PATCH] Remove array initialization with single 0 because of compiler compatibility (espressif8266@2.6.3). --- include/pong.h | 4 ++-- include/snake.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/pong.h b/include/pong.h index d06f888..e27fc79 100644 --- a/include/pong.h +++ b/include/pong.h @@ -79,8 +79,8 @@ private: UDPLogger *_logger; uint8_t _gameState = 0; uint8_t _numBots = 0; - uint8_t _playerMovement[PLAYER_AMOUNT] = {0}; - Coords _paddles[PLAYER_AMOUNT][PADDLE_WIDTH] = {0}; + uint8_t _playerMovement[PLAYER_AMOUNT]; + Coords _paddles[PLAYER_AMOUNT][PADDLE_WIDTH]; Coords _ball = {0, 0}; Coords _ball_old = {0, 0}; int _ballMovement[2] = {0, 0}; diff --git a/include/snake.h b/include/snake.h index 5556506..03c6a21 100644 --- a/include/snake.h +++ b/include/snake.h @@ -76,7 +76,7 @@ private: uint8_t _userDirection = 0; uint8_t _gameState = 0; Coords _head = {0, 0}; - Coords _tail[MAX_TAIL_LENGTH] = {0}; + Coords _tail[MAX_TAIL_LENGTH]; Coords _food = {0, 0}; unsigned long _lastDrawUpdate = 0; unsigned long _lastButtonClick = 0;