From 90f546f1b26a5a961bee091f565fb213484b166e Mon Sep 17 00:00:00 2001 From: Patricia Aas Date: Fri, 10 Sep 2021 15:35:06 +0200 Subject: [PATCH] Revert "There is no standardized interface to add an additional message to assert errors. A portable way to include one is to use a comma operator provided it has not been overloaded" This reverts commit 32a27e986ed96937c7069e24e8f0ca8d2334ebec. --- lib/Inky.cpp | 2 +- lib/Pinky.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Inky.cpp b/lib/Inky.cpp index 43ebd0f..6e568c9 100644 --- a/lib/Inky.cpp +++ b/lib/Inky.cpp @@ -43,7 +43,7 @@ Position Inky::target(const GameState & gameState) const { targetPosition.y += 2; break; case Direction::NONE: - assert(("Pacman should be moving", false)); + assert(false && "Pacman should be moving!"); break; } diff --git a/lib/Pinky.cpp b/lib/Pinky.cpp index 6965fc3..0c06605 100644 --- a/lib/Pinky.cpp +++ b/lib/Pinky.cpp @@ -43,7 +43,7 @@ Position Pinky::target(const GameState & gameState) const { targetPosition.y += 4; break; case Direction::NONE: - assert(("Pacman should be moving", false)); + assert(false && "Pacman should be moving!"); break; } return gridPositionToPosition(targetPosition);