Fix for issue 1007
_clang-format file and applied to HelloWorld.cpp usage: clang-format -style=file -i examples/HelloWorld/HelloWorld.cpp THere are still some issues with clang-format and its style
This commit is contained in:
90
_clang-format
Normal file
90
_clang-format
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
---
|
||||||
|
Language: Cpp
|
||||||
|
# BasedOnStyle: Google
|
||||||
|
AccessModifierOffset: -1
|
||||||
|
AlignAfterOpenBracket: Align
|
||||||
|
AlignConsecutiveAssignments: false
|
||||||
|
AlignConsecutiveDeclarations: false
|
||||||
|
AlignEscapedNewlinesLeft: true
|
||||||
|
AlignOperands: true
|
||||||
|
AlignTrailingComments: true
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: true
|
||||||
|
AllowShortBlocksOnASingleLine: false
|
||||||
|
AllowShortCaseLabelsOnASingleLine: false
|
||||||
|
AllowShortFunctionsOnASingleLine: All
|
||||||
|
AllowShortIfStatementsOnASingleLine: true
|
||||||
|
AllowShortLoopsOnASingleLine: true
|
||||||
|
AlwaysBreakAfterDefinitionReturnType: None
|
||||||
|
AlwaysBreakAfterReturnType: None
|
||||||
|
AlwaysBreakBeforeMultilineStrings: true
|
||||||
|
AlwaysBreakTemplateDeclarations: true
|
||||||
|
BinPackArguments: true
|
||||||
|
BinPackParameters: true
|
||||||
|
BraceWrapping:
|
||||||
|
AfterClass: false
|
||||||
|
AfterControlStatement: false
|
||||||
|
AfterEnum: false
|
||||||
|
AfterFunction: false
|
||||||
|
AfterNamespace: false
|
||||||
|
AfterObjCDeclaration: false
|
||||||
|
AfterStruct: false
|
||||||
|
AfterUnion: false
|
||||||
|
BeforeCatch: false
|
||||||
|
BeforeElse: false
|
||||||
|
IndentBraces: false
|
||||||
|
BreakBeforeBinaryOperators: None
|
||||||
|
BreakBeforeBraces: Allman
|
||||||
|
BreakBeforeTernaryOperators: true
|
||||||
|
BreakConstructorInitializersBeforeComma: false
|
||||||
|
ColumnLimit: 0
|
||||||
|
CommentPragmas: '^ IWYU pragma:'
|
||||||
|
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||||
|
ConstructorInitializerIndentWidth: 4
|
||||||
|
ContinuationIndentWidth: 4
|
||||||
|
Cpp11BracedListStyle: true
|
||||||
|
DerivePointerAlignment: true
|
||||||
|
DisableFormat: false
|
||||||
|
ExperimentalAutoDetectBinPacking: false
|
||||||
|
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
|
||||||
|
IncludeCategories:
|
||||||
|
- Regex: '^<.*\.h>'
|
||||||
|
Priority: 1
|
||||||
|
- Regex: '^<.*'
|
||||||
|
Priority: 2
|
||||||
|
- Regex: '.*'
|
||||||
|
Priority: 3
|
||||||
|
IndentCaseLabels: true
|
||||||
|
IndentWidth: 4
|
||||||
|
IndentWrappedFunctionNames: false
|
||||||
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||||
|
MacroBlockBegin: ''
|
||||||
|
MacroBlockEnd: ''
|
||||||
|
MaxEmptyLinesToKeep: 1
|
||||||
|
NamespaceIndentation: None
|
||||||
|
ObjCBlockIndentWidth: 2
|
||||||
|
ObjCSpaceAfterProperty: false
|
||||||
|
ObjCSpaceBeforeProtocolList: false
|
||||||
|
PenaltyBreakBeforeFirstCallParameter: 1
|
||||||
|
PenaltyBreakComment: 300
|
||||||
|
PenaltyBreakFirstLessLess: 120
|
||||||
|
PenaltyBreakString: 1000
|
||||||
|
PenaltyExcessCharacter: 1000000
|
||||||
|
PenaltyReturnTypeOnItsOwnLine: 200
|
||||||
|
PointerAlignment: Left
|
||||||
|
ReflowComments: false
|
||||||
|
SortIncludes: false
|
||||||
|
SpaceAfterCStyleCast: false
|
||||||
|
SpaceBeforeAssignmentOperators: true
|
||||||
|
SpaceBeforeParens: ControlStatements
|
||||||
|
SpaceInEmptyParentheses: false
|
||||||
|
SpacesBeforeTrailingComments: 2
|
||||||
|
SpacesInAngles: false
|
||||||
|
SpacesInContainerLiterals: true
|
||||||
|
SpacesInCStyleCastParentheses: false
|
||||||
|
SpacesInParentheses: false
|
||||||
|
SpacesInSquareBrackets: false
|
||||||
|
Standard: Auto
|
||||||
|
TabWidth: 4
|
||||||
|
UseTab: Always
|
||||||
|
...
|
||||||
|
|
||||||
@@ -48,7 +48,6 @@ int main(int argc, char** argv)
|
|||||||
//make sure to re-use collision shapes among rigid bodies whenever possible!
|
//make sure to re-use collision shapes among rigid bodies whenever possible!
|
||||||
btAlignedObjectArray<btCollisionShape*> collisionShapes;
|
btAlignedObjectArray<btCollisionShape*> collisionShapes;
|
||||||
|
|
||||||
|
|
||||||
///create a few basic rigid bodies
|
///create a few basic rigid bodies
|
||||||
|
|
||||||
//the ground is a cube of side 100 at position y = -56.
|
//the ground is a cube of side 100 at position y = -56.
|
||||||
@@ -80,7 +79,6 @@ int main(int argc, char** argv)
|
|||||||
dynamicsWorld->addRigidBody(body);
|
dynamicsWorld->addRigidBody(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
//create a dynamic rigidbody
|
//create a dynamic rigidbody
|
||||||
|
|
||||||
@@ -111,11 +109,8 @@ int main(int argc, char** argv)
|
|||||||
dynamicsWorld->addRigidBody(body);
|
dynamicsWorld->addRigidBody(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// Do some simulation
|
/// Do some simulation
|
||||||
|
|
||||||
|
|
||||||
///-----stepsimulation_start-----
|
///-----stepsimulation_start-----
|
||||||
for (i = 0; i < 150; i++)
|
for (i = 0; i < 150; i++)
|
||||||
{
|
{
|
||||||
@@ -130,8 +125,8 @@ int main(int argc, char** argv)
|
|||||||
if (body && body->getMotionState())
|
if (body && body->getMotionState())
|
||||||
{
|
{
|
||||||
body->getMotionState()->getWorldTransform(trans);
|
body->getMotionState()->getWorldTransform(trans);
|
||||||
|
}
|
||||||
} else
|
else
|
||||||
{
|
{
|
||||||
trans = obj->getWorldTransform();
|
trans = obj->getWorldTransform();
|
||||||
}
|
}
|
||||||
@@ -183,4 +178,3 @@ int main(int argc, char** argv)
|
|||||||
//next line is optional: it will be cleared by the destructor when the array goes out of scope
|
//next line is optional: it will be cleared by the destructor when the array goes out of scope
|
||||||
collisionShapes.clear();
|
collisionShapes.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user