From 897e11891d024fd89c3f280921d7a707ac1a8647 Mon Sep 17 00:00:00 2001 From: Nishi Date: Mon, 25 May 2026 12:12:03 +0900 Subject: [PATCH] format --- .clang-format | 24 ++++++++++++++++++++++++ engine/include/fishbone/client.h | 4 ++-- engine/include/fishbone/mixer.h | 2 +- engine/include/fishbone/sound.h | 4 ++-- format.sh | 2 ++ 5 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 .clang-format create mode 100755 format.sh diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..eb9d30c --- /dev/null +++ b/.clang-format @@ -0,0 +1,24 @@ +--- +UseTab: Always +TabWidth: 8 +AlignConsecutiveAssignments: + Enabled: true +AlignConsecutiveDeclarations: + Enabled: true +AccessModifierOffset: -4 +NamespaceIndentation: All +IndentWidth: 8 +PointerAlignment: Left +ColumnLimit: 0 +AllowShortIfStatementsOnASingleLine: Always +AllowShortBlocksOnASingleLine: Never +AllowShortFunctionsOnASingleLine: Empty +AllowShortLoopsOnASingleLine: true +BreakBeforeBraces: Custom +BraceWrapping: + AfterCaseLabel: true +SpaceBeforeParens: Never +AlignEscapedNewlines: DontAlign +SortIncludes: false +AllowShortEnumsOnASingleLine: false +#IndentPPDirectives: AfterHash diff --git a/engine/include/fishbone/client.h b/engine/include/fishbone/client.h index 6f9bdd5..891b864 100644 --- a/engine/include/fishbone/client.h +++ b/engine/include/fishbone/client.h @@ -9,9 +9,9 @@ namespace fishbone { namespace fishbone { class Client { - public: + public: fishbone::SoundDriver sound; }; -}; +}; // namespace fishbone #endif diff --git a/engine/include/fishbone/mixer.h b/engine/include/fishbone/mixer.h index aa3f748..16fd1fb 100644 --- a/engine/include/fishbone/mixer.h +++ b/engine/include/fishbone/mixer.h @@ -8,6 +8,6 @@ namespace fishbone { namespace fishbone { class Mixer { }; -}; +}; // namespace fishbone #endif diff --git a/engine/include/fishbone/sound.h b/engine/include/fishbone/sound.h index 80f8238..8cb12dc 100644 --- a/engine/include/fishbone/sound.h +++ b/engine/include/fishbone/sound.h @@ -4,7 +4,7 @@ namespace fishbone { class SoundDriver; class SoundLoader; -}; +}; // namespace fishbone #include @@ -14,6 +14,6 @@ namespace fishbone { }; class SoundLoader { }; -}; +}; // namespace fishbone #endif diff --git a/format.sh b/format.sh new file mode 100755 index 0000000..cd1cfb5 --- /dev/null +++ b/format.sh @@ -0,0 +1,2 @@ +#!/bin/sh +clang-format --verbose -i `find engine/include engine/src -name "*.cc" -or -name "*.h"`