diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..ec0373c --- /dev/null +++ b/.clang-format @@ -0,0 +1,63 @@ +--- +Language: Cpp +BasedOnStyle: WebKit +AlignAfterOpenBracket: true +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignConsecutiveMacros: true +AlignOperands: Align +AlignTrailingComments: false +AllowShortBlocksOnASingleLine: Empty +AllowShortCaseLabelsOnASingleLine: true +AllowShortIfStatementsOnASingleLine: Always +AllowShortLoopsOnASingleLine: true +AlwaysBreakTemplateDeclarations: Yes +BraceWrapping: + AfterCaseLabel: false + AfterClass: false + AfterControlStatement: false + AfterEnum: false + AfterFunction: false + AfterNamespace: false + AfterStruct: false + AfterUnion: false + AfterExternBlock: false + BeforeCatch: false + BeforeElse: false + BeforeLambdaBody: false + BeforeWhile: false + SplitEmptyFunction: false + SplitEmptyRecord: false + SplitEmptyNamespace: false +BreakBeforeBraces: Custom +BreakConstructorInitializers: AfterColon +BreakConstructorInitializersBeforeComma: false +ColumnLimit: 120 +ConstructorInitializerAllOnOneLineOrOnePerLine: false +Cpp11BracedListStyle: true +IncludeCategories: + - Regex: '^<.*' + Priority: 1 + - Regex: '^".*' + Priority: 2 + - Regex: '.*' + Priority: 3 +IncludeIsMainRegex: '([-_](test|unittest))?$' +InsertNewlineAtEOF: true +KeepEmptyLinesAtTheStartOfBlocks: false +MacroBlockBegin: '' +MacroBlockEnd: '' +MaxEmptyLinesToKeep: 2 +NamespaceIndentation: All +PenaltyBreakAssignment: 0 +PenaltyBreakBeforeFirstCallParameter: 0 +ReferenceAlignment: Right +#ReflowComments: false +SortUsingDeclarations: Lexicographic +SpaceInEmptyParentheses: false +SpacesInAngles: Never +SpacesInConditionalStatement: false +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +TabWidth: 4 + diff --git a/.gitignore b/.gitignore index 022166f..742acfa 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,9 @@ cmake-build-debug-gcc /*.dSYM # 忽略 linux 编译产物 -/* -!/*.* -!*/ \ No newline at end of file +**/* +!**/*.* +!*/ + +*.dSYM/ +**/*.out \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index e596ce6..c281a00 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -7,7 +7,7 @@