Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FSUI: Formatting #12384

Merged
merged 1 commit into from
Mar 3, 2025
Merged

FSUI: Formatting #12384

merged 1 commit into from
Mar 3, 2025

Conversation

TheLastRar
Copy link
Contributor

@TheLastRar TheLastRar commented Mar 3, 2025

Description of Changes

Format FullscreenUI, again

Rationale behind Changes

In #12366, I had formatted this file after getting frustrated with how similar lines where formatted in 3 different ways.
With the exception of 3 string arrays got as collateral, clangformat matched the existing code
It was, however, determined that the existing code was not formatted as nice as we would like.
While we can't precisely configure clangformat's behaviour here, it was found that adding a trailing , mostly gets the desired behaviour.

Also, re-adds a space that was removed in #12369, I'm unsure why it was removed so RFC here.

Suggested Testing Steps

Is the code visually better looking

@TheLastRar TheLastRar requested a review from TellowKrinkle March 3, 2025 19:30
@TheLastRar
Copy link
Contributor Author

TheLastRar commented Mar 3, 2025

There are a couple sections of code where we have a multiline list with multiple elements on the same line Like here;

static constexpr const char* titles[] = {FSUI_NSTR("Summary"), FSUI_NSTR("Interface Settings"), FSUI_NSTR("BIOS Settings"),
FSUI_NSTR("Emulation Settings"), FSUI_NSTR("Graphics Settings"), FSUI_NSTR("Audio Settings"), FSUI_NSTR("Memory Card Settings"),
FSUI_NSTR("Controller Settings"), FSUI_NSTR("Hotkey Settings"), FSUI_NSTR("Achievements Settings"),
FSUI_NSTR("Folder Settings"), FSUI_NSTR("Advanced Settings"), FSUI_NSTR("Patches"), FSUI_NSTR("Cheats"),
FSUI_NSTR("Game Fixes")};

Adding a trailing comma will cause clang-format to put each element on its own line, Is that preferable to the current form?

Currently I have left them as is, as they had been untouched in my prior format commit

@lightningterror lightningterror merged commit 4654a3e into PCSX2:master Mar 3, 2025
12 checks passed
@TheLastRar TheLastRar deleted the FSUI-format branch March 3, 2025 23:42
@TellowKrinkle
Copy link
Member

Adding a trailing comma will cause clang-format to put each element on its own line, Is that preferable to the current form?

I would prefer that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants