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