From 4cd3eed090b7a58f09d8e8460b2f5b0c64e6de67 Mon Sep 17 00:00:00 2001 From: forntoh Date: Mon, 7 Oct 2024 00:31:34 +0200 Subject: [PATCH] Use elvis operator --- src/renderer/CharacterDisplayRenderer.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/renderer/CharacterDisplayRenderer.cpp b/src/renderer/CharacterDisplayRenderer.cpp index a77b91dd..72e6d2aa 100644 --- a/src/renderer/CharacterDisplayRenderer.cpp +++ b/src/renderer/CharacterDisplayRenderer.cpp @@ -63,13 +63,7 @@ void CharacterDisplayRenderer::appendCursorToText(uint8_t screenRow, const char* } void CharacterDisplayRenderer::appendIndicatorToText(uint8_t screenRow, const char* text, char* buf) { - uint8_t indicator = 0; - if (hasHiddenItemsAbove) { - indicator = 1; - } else if (hasHiddenItemsBelow) { - indicator = 2; - } - + uint8_t indicator = (hasHiddenItemsAbove) ? 1 : (hasHiddenItemsBelow) ? 2 : 0; if (indicator != 0) { concat(text, indicator, buf); } else {