Skip to content

Commit

Permalink
clang-format: update style
Browse files Browse the repository at this point in the history
  • Loading branch information
korli committed May 8, 2024
1 parent 3dbdbf7 commit c71dd0a
Show file tree
Hide file tree
Showing 179 changed files with 11,279 additions and 12,128 deletions.
249 changes: 16 additions & 233 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,237 +1,20 @@
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: BlockIndent
AlignArrayOfStructures: None
AlignConsecutiveAssignments:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: true
AlignConsecutiveBitFields:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveDeclarations:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveMacros:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveShortCaseStatements:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCaseColons: false
AlignEscapedNewlines: Right
AlignOperands: Align
AlignTrailingComments:
Kind: Always
OverEmptyLines: 0
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: TopLevel
AlwaysBreakAfterReturnType: TopLevel
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
AttributeMacros:
- __capability
BinPackArguments: true
Language: Cpp # single option
BasedOnStyle: Chromium
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlwaysBreakAfterReturnType: TopLevelDefinitions
BinPackParameters: true
BitFieldColonSpacing: Both
ColumnLimit: 100
LineEnding: LF
TabWidth: 4
IndentWidth: 4
UseTab: Always
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterExternBlock: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakAfterAttributes: Always
BreakAfterJavaFieldAnnotations: false
BreakArrays: true
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Mozilla
BreakBeforeInlineASMColon: OnlyMultiline
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
BreakStringLiterals: true
ColumnLimit: 100
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: false
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentRequiresClause: true
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertBraces: false
InsertNewlineAtEOF: false
InsertTrailingCommas: None
IntegerLiteralSeparator:
Binary: 0
BinaryMinDigits: 0
Decimal: 0
DecimalMinDigits: 0
Hex: 0
HexMinDigits: 0
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
KeepEmptyLinesAtEOF: false
LambdaBodyIndentation: Signature
LineEnding: DeriveLF
MacroBlockBegin: ''
MacroBlockEnd: ''
AfterCaseLabel: true
AfterEnum: false
AfterFunction: true
BreakBeforeBraces: Custom
AllowShortEnumsOnASingleLine: false
SeparateDefinitionBlocks: Leave
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: BinPack
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
PPIndentWidth: -1
QualifierAlignment: Leave
ReferenceAlignment: Pointer
ReflowComments: true
RemoveBracesLLVM: false
RemoveParentheses: Leave
RemoveSemicolon: false
RequiresClausePosition: OwnLine
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Always
ShortNamespaceLines: 1
SortIncludes: false
SortJavaStaticImport: Before
SortUsingDeclarations: LexicographicNumeric
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeJsonColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
AfterRequiresInClause: false
AfterRequiresInExpression: false
BeforeNonEmptyParentheses: false
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInContainerLiterals: true
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParens: Never
SpacesInParensOptions:
InCStyleCasts: false
InConditionalStatements: false
InEmptyParentheses: false
Other: false
SpacesInSquareBrackets: false
Standard: Latest
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 4
UseTab: Always
VerilogBreakBetweenInstancePorts: true
WhitespaceSensitiveMacros:
- BOOST_PP_STRINGIZE
- CF_SWIFT_NAME
- NS_SWIFT_NAME
- PP_STRINGIZE
- STRINGIZE
...


5 changes: 2 additions & 3 deletions source/AboutView.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "AboutView.h"
#include "Colors.h"
#include <Application.h>
#include <stdio.h>
#include <string.h>
#include "Colors.h"
#include "Settings.h"

SAboutView::SAboutView(BRect rect, BBitmap* becasso, BBitmap* sum, bool startup)
Expand All @@ -19,8 +19,7 @@ SAboutView::SAboutView(BRect rect, BBitmap* becasso, BBitmap* sum, bool startup)
url =
new BButton(BRect(126, 178, 196, 196), "url", lstring(1, "URL"), new BMessage('aURL'));
doc = new BButton(
BRect(204, 178, 274, 196), "doc", lstring(2, "Manual"), new BMessage('aDOC')
);
BRect(204, 178, 274, 196), "doc", lstring(2, "Manual"), new BMessage('aDOC'));
url->SetTarget(be_app);
doc->SetTarget(be_app);
AddChild(url);
Expand Down
11 changes: 5 additions & 6 deletions source/AboutView.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
#ifndef ABOUTVIEW_H
#define ABOUTVIEW_H

#include <View.h>
#include <Button.h>
#include <Bitmap.h>
#include <Button.h>
#include <View.h>

class SAboutView : public BView
{
public:
class SAboutView : public BView {
public:
SAboutView(BRect rect, BBitmap* becasso, BBitmap* sum, bool startup = false);
virtual ~SAboutView();
virtual void Draw(BRect updateRect);
virtual void SetInitString(const char* s);

private:
private:
typedef BView inherited;
BBitmap* fBecasso;
BBitmap* fSum;
Expand Down
7 changes: 3 additions & 4 deletions source/AboutWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ AboutWindow::MessageReceived(BMessage* msg)
{
// printf ("Huh?!\n");
switch (msg->what) {

default:
inherited::MessageReceived(msg);
break;
default:
inherited::MessageReceived(msg);
break;
}
}
7 changes: 3 additions & 4 deletions source/AboutWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@

#include <Window.h>

class AboutWindow : public BWindow
{
public:
class AboutWindow : public BWindow {
public:
AboutWindow(BRect rect);
virtual ~AboutWindow();
virtual void MessageReceived(BMessage* msg);

private:
private:
typedef BWindow inherited;
};

Expand Down
Loading

0 comments on commit c71dd0a

Please sign in to comment.