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"`