Update clang-format to 8.0.
GitOrigin-RevId: 170be47e4b47607a2bca81d2ed6b5b3d547982ca
This commit is contained in:
parent
24a66bf9e7
commit
f5ea140bc2
@ -17,7 +17,7 @@ AllowShortLoopsOnASingleLine: false # true
|
|||||||
AlwaysBreakAfterDefinitionReturnType: None
|
AlwaysBreakAfterDefinitionReturnType: None
|
||||||
AlwaysBreakAfterReturnType: None
|
AlwaysBreakAfterReturnType: None
|
||||||
AlwaysBreakBeforeMultilineStrings: true
|
AlwaysBreakBeforeMultilineStrings: true
|
||||||
AlwaysBreakTemplateDeclarations: true
|
AlwaysBreakTemplateDeclarations: Yes
|
||||||
BinPackArguments: true
|
BinPackArguments: true
|
||||||
BinPackParameters: true
|
BinPackParameters: true
|
||||||
BraceWrapping:
|
BraceWrapping:
|
||||||
@ -39,6 +39,7 @@ BraceWrapping:
|
|||||||
BreakBeforeBinaryOperators: None
|
BreakBeforeBinaryOperators: None
|
||||||
BreakBeforeBraces: Attach
|
BreakBeforeBraces: Attach
|
||||||
BreakBeforeInheritanceComma: true # false
|
BreakBeforeInheritanceComma: true # false
|
||||||
|
BreakInheritanceList: BeforeComma # BeforeColon
|
||||||
BreakBeforeTernaryOperators: true
|
BreakBeforeTernaryOperators: true
|
||||||
BreakConstructorInitializersBeforeComma: true # false
|
BreakConstructorInitializersBeforeComma: true # false
|
||||||
BreakConstructorInitializers: BeforeComma # BeforeColon
|
BreakConstructorInitializers: BeforeComma # BeforeColon
|
||||||
@ -55,7 +56,9 @@ DerivePointerAlignment: true
|
|||||||
DisableFormat: false
|
DisableFormat: false
|
||||||
ExperimentalAutoDetectBinPacking: false
|
ExperimentalAutoDetectBinPacking: false
|
||||||
FixNamespaceComments: true
|
FixNamespaceComments: true
|
||||||
ForEachMacros: [ Q_FOREACH_THIS_LIST_MUST_BE_NON_EMPTY ]
|
ForEachMacros:
|
||||||
|
- Q_FOREACH_THIS_LIST_MUST_BE_NON_EMPTY
|
||||||
|
IncludeBlocks: Preserve
|
||||||
IndentCaseLabels: true
|
IndentCaseLabels: true
|
||||||
IndentPPDirectives: None
|
IndentPPDirectives: None
|
||||||
IndentWidth: 2
|
IndentWidth: 2
|
||||||
@ -67,14 +70,16 @@ MacroBlockBegin: ''
|
|||||||
MacroBlockEnd: ''
|
MacroBlockEnd: ''
|
||||||
MaxEmptyLinesToKeep: 1
|
MaxEmptyLinesToKeep: 1
|
||||||
NamespaceIndentation: None
|
NamespaceIndentation: None
|
||||||
|
# ObjCBinPackProtocolList: Never
|
||||||
# ObjCBlockIndentWidth: 2
|
# ObjCBlockIndentWidth: 2
|
||||||
# ObjCSpaceAfterProperty: false
|
# ObjCSpaceAfterProperty: false
|
||||||
# ObjCSpaceBeforeProtocolList: false
|
# ObjCSpaceBeforeProtocolList: true
|
||||||
PenaltyBreakAssignment: 2
|
PenaltyBreakAssignment: 2
|
||||||
PenaltyBreakBeforeFirstCallParameter: 1
|
PenaltyBreakBeforeFirstCallParameter: 1
|
||||||
PenaltyBreakComment: 300
|
PenaltyBreakComment: 300
|
||||||
PenaltyBreakFirstLessLess: 120
|
PenaltyBreakFirstLessLess: 120
|
||||||
PenaltyBreakString: 1000
|
PenaltyBreakString: 1000
|
||||||
|
PenaltyBreakTemplateDeclaration: 10
|
||||||
PenaltyExcessCharacter: 1000000
|
PenaltyExcessCharacter: 1000000
|
||||||
PenaltyReturnTypeOnItsOwnLine: 200
|
PenaltyReturnTypeOnItsOwnLine: 200
|
||||||
PointerAlignment: Left
|
PointerAlignment: Left
|
||||||
@ -84,7 +89,11 @@ SortUsingDeclarations: false # true
|
|||||||
SpaceAfterCStyleCast: false
|
SpaceAfterCStyleCast: false
|
||||||
SpaceAfterTemplateKeyword: true
|
SpaceAfterTemplateKeyword: true
|
||||||
SpaceBeforeAssignmentOperators: true
|
SpaceBeforeAssignmentOperators: true
|
||||||
|
SpaceBeforeCpp11BracedList: false
|
||||||
|
SpaceBeforeCtorInitializerColon: true
|
||||||
|
SpaceBeforeInheritanceColon: true
|
||||||
SpaceBeforeParens: ControlStatements
|
SpaceBeforeParens: ControlStatements
|
||||||
|
SpaceBeforeRangeBasedForLoopColon: true
|
||||||
SpaceInEmptyParentheses: false
|
SpaceInEmptyParentheses: false
|
||||||
SpacesBeforeTrailingComments: 2
|
SpacesBeforeTrailingComments: 2
|
||||||
SpacesInAngles: false
|
SpacesInAngles: false
|
||||||
|
@ -15,8 +15,7 @@
|
|||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
template <class BinlogT, class StorerT>
|
template <class BinlogT, class StorerT>
|
||||||
uint64 binlog_add(const BinlogT &binlog_ptr, int32 type, const StorerT &storer,
|
uint64 binlog_add(const BinlogT &binlog_ptr, int32 type, const StorerT &storer, Promise<> promise = Promise<>()) {
|
||||||
Promise<> promise = Promise<>()) {
|
|
||||||
auto logevent_id = binlog_ptr->next_id();
|
auto logevent_id = binlog_ptr->next_id();
|
||||||
binlog_ptr->add_raw_event(logevent_id, BinlogEvent::create_raw(logevent_id, type, 0, storer), std::move(promise));
|
binlog_ptr->add_raw_event(logevent_id, BinlogEvent::create_raw(logevent_id, type, 0, storer), std::move(promise));
|
||||||
return logevent_id;
|
return logevent_id;
|
||||||
@ -24,7 +23,7 @@ uint64 binlog_add(const BinlogT &binlog_ptr, int32 type, const StorerT &storer,
|
|||||||
|
|
||||||
template <class BinlogT, class StorerT>
|
template <class BinlogT, class StorerT>
|
||||||
uint64 binlog_rewrite(const BinlogT &binlog_ptr, uint64 logevent_id, int32 type, const StorerT &storer,
|
uint64 binlog_rewrite(const BinlogT &binlog_ptr, uint64 logevent_id, int32 type, const StorerT &storer,
|
||||||
Promise<> promise = Promise<>()) {
|
Promise<> promise = Promise<>()) {
|
||||||
auto seq_no = binlog_ptr->next_id();
|
auto seq_no = binlog_ptr->next_id();
|
||||||
binlog_ptr->add_raw_event(seq_no, BinlogEvent::create_raw(logevent_id, type, BinlogEvent::Flags::Rewrite, storer),
|
binlog_ptr->add_raw_event(seq_no, BinlogEvent::create_raw(logevent_id, type, BinlogEvent::Flags::Rewrite, storer),
|
||||||
std::move(promise));
|
std::move(promise));
|
||||||
@ -35,7 +34,7 @@ uint64 binlog_rewrite(const BinlogT &binlog_ptr, uint64 logevent_id, int32 type,
|
|||||||
|
|
||||||
template <class BinlogT>
|
template <class BinlogT>
|
||||||
uint64 binlog_erase_impl(BinlogDebugInfo info, const BinlogT &binlog_ptr, uint64 logevent_id,
|
uint64 binlog_erase_impl(BinlogDebugInfo info, const BinlogT &binlog_ptr, uint64 logevent_id,
|
||||||
Promise<> promise = Promise<>()) {
|
Promise<> promise = Promise<>()) {
|
||||||
auto seq_no = binlog_ptr->next_id();
|
auto seq_no = binlog_ptr->next_id();
|
||||||
binlog_ptr->add_raw_event(info, seq_no,
|
binlog_ptr->add_raw_event(info, seq_no,
|
||||||
BinlogEvent::create_raw(logevent_id, BinlogEvent::ServiceTypes::Empty,
|
BinlogEvent::create_raw(logevent_id, BinlogEvent::ServiceTypes::Empty,
|
||||||
|
@ -165,8 +165,7 @@ Slice::Slice(T s, std::enable_if_t<std::is_same<char *, std::remove_const_t<T>>:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
Slice::Slice(T s, std::enable_if_t<std::is_same<const char *, std::remove_const_t<T>>::value, private_tag>)
|
Slice::Slice(T s, std::enable_if_t<std::is_same<const char *, std::remove_const_t<T>>::value, private_tag>) : s_(s) {
|
||||||
: s_(s) {
|
|
||||||
CHECK(s_ != nullptr);
|
CHECK(s_ != nullptr);
|
||||||
len_ = std::strlen(s_);
|
len_ = std::strlen(s_);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user