update .clang-format

generated by version 3.8.1
local changes from --style=Google

3a4
> # Generated with clang-format 3.8.1
10c11
< AlignTrailingComments: true
---
> AlignTrailingComments: false
15,16c16,17
< AllowShortIfStatementsOnASingleLine: true
< AllowShortLoopsOnASingleLine: true
---
> AllowShortIfStatementsOnASingleLine: false
> AllowShortLoopsOnASingleLine: false
37c38
< BreakBeforeTernaryOperators: true
---
> BreakBeforeTernaryOperators: false

Change-Id: I4ded7e36fb8bd5407cfba6d1c4f86e0bec620c0c
This commit is contained in:
James Zern
2016-10-17 15:31:33 -07:00
parent fc5f88d3d1
commit 0e179d683e
7 changed files with 75 additions and 37 deletions

View File

@@ -1,53 +1,91 @@
--- ---
Language: Cpp Language: Cpp
# BasedOnStyle: Google # BasedOnStyle: Google
# Generated with clang-format 3.8.1
AccessModifierOffset: -1 AccessModifierOffset: -1
ConstructorInitializerIndentWidth: 4 AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: false AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: true AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakTemplateDeclarations: true AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true AlwaysBreakBeforeMultilineStrings: true
BreakBeforeBinaryOperators: false 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: Attach
BreakBeforeTernaryOperators: false BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false BreakConstructorInitializersBeforeComma: false
BinPackParameters: true
ColumnLimit: 80 ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerAllOnOneLineOrOnePerLine: true
DerivePointerBinding: true ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: true
DisableFormat: false
ExperimentalAutoDetectBinPacking: false ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
- Regex: '^<.*\.h>'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
IndentCaseLabels: true IndentCaseLabels: true
MaxEmptyLinesToKeep: 1 IndentWidth: 2
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 1 PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300 PenaltyBreakComment: 300
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120 PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000 PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200 PenaltyReturnTypeOnItsOwnLine: 200
PointerBindsToType: true PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2 SpacesBeforeTrailingComments: 2
Cpp11BracedListStyle: true SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto Standard: Auto
IndentWidth: 2
TabWidth: 8 TabWidth: 8
UseTab: Never UseTab: Never
BreakBeforeBraces: Attach
IndentFunctionDeclarationAfterType: true
SpacesInParentheses: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpaceBeforeAssignmentOperators: true
ContinuationIndentWidth: 4
CommentPragmas: '^ IWYU pragma:'
SpaceBeforeParens: ControlStatements
... ...

View File

@@ -4117,7 +4117,7 @@ ContentEncoding::~ContentEncoding() {
} }
const ContentEncoding::ContentCompression* const ContentEncoding::ContentCompression*
ContentEncoding::GetCompressionByIndex(unsigned long idx) const { ContentEncoding::GetCompressionByIndex(unsigned long idx) const {
const ptrdiff_t count = compression_entries_end_ - compression_entries_; const ptrdiff_t count = compression_entries_end_ - compression_entries_;
assert(count >= 0); assert(count >= 0);

View File

@@ -1132,7 +1132,8 @@ class DemoCallback : public Callback {
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {
if ((argc != 1 && argc != 2) || if ((argc != 1 && argc != 2) ||
(argc == 2 && argv[1] == std::string("--help"))) { (argc == 2 && argv[1] == std::string("--help"))) {
std::cerr << "Usage:\n" << argv[0] << " [path-to-webm-file]\n\n" std::cerr << "Usage:\n"
<< argv[0] << " [path-to-webm-file]\n\n"
<< "Prints info for the WebM file specified in the command line. " << "Prints info for the WebM file specified in the command line. "
"If no file is\n" "If no file is\n"
<< "specified, stdin is used as input.\n"; << "specified, stdin is used as input.\n";

View File

@@ -45,8 +45,7 @@ class IstreamReader : public Reader {
reference derived from `std::istream`. reference derived from `std::istream`.
*/ */
template <typename T> template <typename T>
explicit IstreamReader(T&& istream) explicit IstreamReader(T&& istream) : istream_(new T(std::move(istream))) {}
: istream_(new T(std::move(istream))) {}
/** /**
Constructs a new reader by moving the provided reader into the new reader. Constructs a new reader by moving the provided reader into the new reader.

View File

@@ -60,7 +60,7 @@ class Ancestory {
// Constructs an Ancestory using the first count elements of ancestory. // Constructs an Ancestory using the first count elements of ancestory.
// ancestory must have static storage duration. // ancestory must have static storage duration.
template <std::size_t N> template <std::size_t N>
Ancestory(const Id(&ancestory)[N], std::size_t count) Ancestory(const Id (&ancestory)[N], std::size_t count)
: begin_(ancestory), end_(ancestory + count) { : begin_(ancestory), end_(ancestory + count) {
assert(count <= N); assert(count <= N);
} }

View File

@@ -23,7 +23,7 @@ namespace {
// Creates a std::array from a string literal (and omits the trailing // Creates a std::array from a string literal (and omits the trailing
// NUL-character). // NUL-character).
template <std::size_t N> template <std::size_t N>
std::array<std::uint8_t, N - 1> ArrayFromString(const char(&string)[N]) { std::array<std::uint8_t, N - 1> ArrayFromString(const char (&string)[N]) {
std::array<std::uint8_t, N - 1> array; std::array<std::uint8_t, N - 1> array;
std::copy_n(string, N - 1, array.begin()); std::copy_n(string, N - 1, array.begin());
return array; return array;