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
# BasedOnStyle: Google
# Generated with clang-format 3.8.1
AccessModifierOffset: -1
ConstructorInitializerIndentWidth: 4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: true
AlwaysBreakTemplateDeclarations: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
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
BreakConstructorInitializersBeforeComma: false
BinPackParameters: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: true
DerivePointerBinding: 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
MaxEmptyLinesToKeep: 1
IndentWidth: 2
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerBindsToType: true
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
Cpp11BracedListStyle: true
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto
IndentWidth: 2
TabWidth: 8
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*
ContentEncoding::GetCompressionByIndex(unsigned long idx) const {
ContentEncoding::GetCompressionByIndex(unsigned long idx) const {
const ptrdiff_t count = compression_entries_end_ - compression_entries_;
assert(count >= 0);

View File

@ -1132,7 +1132,8 @@ class DemoCallback : public Callback {
int main(int argc, char* argv[]) {
if ((argc != 1 && argc != 2) ||
(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. "
"If no file is\n"
<< "specified, stdin is used as input.\n";

View File

@ -45,8 +45,7 @@ class IstreamReader : public Reader {
reference derived from `std::istream`.
*/
template <typename T>
explicit IstreamReader(T&& istream)
: istream_(new T(std::move(istream))) {}
explicit IstreamReader(T&& istream) : istream_(new T(std::move(istream))) {}
/**
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.
// ancestory must have static storage duration.
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) {
assert(count <= N);
}

View File

@ -180,7 +180,7 @@ class MasterValueParser : public ElementParser {
// If called, OnParseStarted will be called on the parent element when this
// particular element is encountered.
constexpr SingleChildFactory<Parser, Value, TagUseAsStart, Tags...>
UseAsStartEvent() const {
UseAsStartEvent() const {
return {id_, member_};
}
@ -188,7 +188,7 @@ class MasterValueParser : public ElementParser {
// particular element is fully parsed.
constexpr SingleChildFactory<Parser, Value, TagNotifyOnParseComplete,
Tags...>
NotifyOnParseComplete() const {
NotifyOnParseComplete() const {
return {id_, member_};
}
@ -227,7 +227,7 @@ class MasterValueParser : public ElementParser {
// If called, OnParseStarted will be called on the parent element when this
// particular element is encountered.
constexpr RepeatedChildFactory<Parser, Value, TagUseAsStart, Tags...>
UseAsStartEvent() const {
UseAsStartEvent() const {
return {id_, member_};
}
@ -235,7 +235,7 @@ class MasterValueParser : public ElementParser {
// particular element is fully parsed.
constexpr RepeatedChildFactory<Parser, Value, TagNotifyOnParseComplete,
Tags...>
NotifyOnParseComplete() const {
NotifyOnParseComplete() const {
return {id_, member_};
}
@ -423,7 +423,7 @@ class MasterValueParser : public ElementParser {
template <typename Parser, typename Value, typename... Tags, typename F>
static typename std::enable_if<!std::is_constructible<Parser, Value>::value,
std::unique_ptr<ElementParser>>::type
MakeChildParser(MasterValueParser* parent, F consume_element_value, ...) {
MakeChildParser(MasterValueParser* parent, F consume_element_value, ...) {
return std::unique_ptr<ElementParser>(new ChildParser<Parser, F, Tags...>(
parent, std::move(consume_element_value)));
}
@ -433,8 +433,8 @@ class MasterValueParser : public ElementParser {
template <typename Parser, typename Value, typename... Tags, typename F>
static typename std::enable_if<std::is_constructible<Parser, Value>::value,
std::unique_ptr<ElementParser>>::type
MakeChildParser(MasterValueParser* parent, F consume_element_value,
const Element<Value>* default_value) {
MakeChildParser(MasterValueParser* parent, F consume_element_value,
const Element<Value>* default_value) {
return std::unique_ptr<ElementParser>(new ChildParser<Parser, F, Tags...>(
parent, std::move(consume_element_value), default_value->value()));
}
@ -444,8 +444,8 @@ class MasterValueParser : public ElementParser {
template <typename Parser, typename Value, typename... Tags, typename F>
static typename std::enable_if<std::is_constructible<Parser, Value>::value,
std::unique_ptr<ElementParser>>::type
MakeChildParser(MasterValueParser* parent, F consume_element_value,
const std::vector<Element<Value>>* member) {
MakeChildParser(MasterValueParser* parent, F consume_element_value,
const std::vector<Element<Value>>* member) {
Value default_value{};
if (!member->empty()) {
default_value = member->front().value();

View File

@ -23,7 +23,7 @@ namespace {
// Creates a std::array from a string literal (and omits the trailing
// NUL-character).
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::copy_n(string, N - 1, array.begin());
return array;