Skip to content

Commit

Permalink
Use elvis operator
Browse files Browse the repository at this point in the history
  • Loading branch information
forntoh committed Oct 6, 2024
1 parent 7d7e3c4 commit 4cd3eed
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/renderer/CharacterDisplayRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Check failure on line 66 in src/renderer/CharacterDisplayRenderer.cpp

View workflow job for this annotation

GitHub Actions / clang_format

src/renderer/CharacterDisplayRenderer.cpp#L66

code should be clang-formatted [-Wclang-format-violations]
if (indicator != 0) {
concat(text, indicator, buf);
} else {
Expand Down

0 comments on commit 4cd3eed

Please sign in to comment.