mirror of
https://github.com/transmission/transmission
synced 2024-12-22 07:42:37 +00:00
chore: misc formatting updates and fixes (#7049)
* chore: remove redundant `.clang-format` entry for `TR_DEFINE_QUARK` Left-over frombf41e1487a
. * chore: remove redundant `.clang-format` entry for `API_HEADER_*` Left-over fromf7edcfcb2a
. * chore: drop deprecated options in favour of `PackConstructorInitializers` * fix: invalid `SpacesInAngles` value * chore: add comment to forecast a change we need to make in the future * chore: add trailing comma to prettify lambda
This commit is contained in:
parent
3e9f5f614a
commit
120b2fb6a0
2 changed files with 7 additions and 14 deletions
|
@ -35,7 +35,7 @@ ReflowComments: false
|
||||||
SortIncludes: Never
|
SortIncludes: Never
|
||||||
SpaceAfterCStyleCast: false
|
SpaceAfterCStyleCast: false
|
||||||
SpacesBeforeTrailingComments: 1
|
SpacesBeforeTrailingComments: 1
|
||||||
SpacesInAngles: false
|
SpacesInAngles: Never
|
||||||
SpacesInCStyleCastParentheses: false
|
SpacesInCStyleCastParentheses: false
|
||||||
SpacesInParentheses: false
|
SpacesInParentheses: false
|
||||||
SpacesInSquareBrackets: false
|
SpacesInSquareBrackets: false
|
||||||
|
@ -46,24 +46,18 @@ Language: Cpp
|
||||||
Standard: c++17
|
Standard: c++17
|
||||||
|
|
||||||
AccessModifierOffset: -4
|
AccessModifierOffset: -4
|
||||||
AllowAllConstructorInitializersOnNextLine: false
|
PackConstructorInitializers: Never
|
||||||
AlwaysBreakAfterReturnType: None
|
AlwaysBreakAfterReturnType: None
|
||||||
AlwaysBreakTemplateDeclarations: Yes
|
AlwaysBreakTemplateDeclarations: Yes
|
||||||
BreakConstructorInitializers: BeforeComma
|
BreakConstructorInitializers: BeforeComma
|
||||||
BreakInheritanceList: BeforeComma
|
BreakInheritanceList: BeforeComma
|
||||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
|
||||||
ConstructorInitializerIndentWidth: 4
|
ConstructorInitializerIndentWidth: 4
|
||||||
FixNamespaceComments: true
|
FixNamespaceComments: true
|
||||||
IndentGotoLabels: false
|
IndentGotoLabels: false
|
||||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||||
QualifierAlignment: Right
|
QualifierAlignment: Right
|
||||||
SortUsingDeclarations: true
|
SortUsingDeclarations: true # Since clang-format 16, the equivalent value is LexicographicNumeric
|
||||||
SpaceAfterTemplateKeyword: false
|
SpaceAfterTemplateKeyword: false
|
||||||
StatementMacros:
|
|
||||||
- TR_DEFINE_QUARK
|
|
||||||
WhitespaceSensitiveMacros:
|
|
||||||
- API_HEADER
|
|
||||||
- API_HEADER_CRYPT
|
|
||||||
---
|
---
|
||||||
Language: ObjC
|
Language: ObjC
|
||||||
|
|
||||||
|
|
|
@ -512,11 +512,10 @@ private:
|
||||||
fmt::arg("error_code", static_cast<int>(rc))));
|
fmt::arg("error_code", static_cast<int>(rc))));
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
auto const info_uniq = std::unique_ptr<addrinfo, void (*)(addrinfo*)>{ info,
|
auto const info_uniq = std::unique_ptr<addrinfo, void (*)(addrinfo*)>{
|
||||||
[](addrinfo* p) // MSVC forced my hands
|
info,
|
||||||
{
|
[](addrinfo* p) { freeaddrinfo(p); }, // MSVC forced me to write this lambda wrapper
|
||||||
freeaddrinfo(p);
|
};
|
||||||
} };
|
|
||||||
|
|
||||||
// N.B. getaddrinfo() will return IPv4-mapped addresses by default on macOS
|
// N.B. getaddrinfo() will return IPv4-mapped addresses by default on macOS
|
||||||
auto socket_address = tr_socket_address::from_sockaddr(info->ai_addr);
|
auto socket_address = tr_socket_address::from_sockaddr(info->ai_addr);
|
||||||
|
|
Loading…
Reference in a new issue