Skip to content

Array initialization sometimes screws up the autoformatter #3144

@JobLeonard

Description

@JobLeonard

Compare:

void saveHighScore() {
  String[] storeScore = {
    str(highScore)
    };
    saveStrings("data/highscore.txt", storeScore);
}
void saveHighScore() {
  String[] storeScore = {
    str(highScore),
  };
  saveStrings("data/highscore.txt", storeScore);
}
void saveHighScore() {
  String[] storeScore = {
    someString
  };
  saveStrings("data/highscore.txt", storeScore);
}

Issue persists if there are multiple elements. I suspect it's the call to str()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions