mirror of
https://github.com/transmission/transmission
synced 2024-12-21 23:32:35 +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
|
||||
SpaceAfterCStyleCast: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInAngles: Never
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
|
@ -46,24 +46,18 @@ Language: Cpp
|
|||
Standard: c++17
|
||||
|
||||
AccessModifierOffset: -4
|
||||
AllowAllConstructorInitializersOnNextLine: false
|
||||
PackConstructorInitializers: Never
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
BreakConstructorInitializers: BeforeComma
|
||||
BreakInheritanceList: BeforeComma
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
FixNamespaceComments: true
|
||||
IndentGotoLabels: false
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
QualifierAlignment: Right
|
||||
SortUsingDeclarations: true
|
||||
SortUsingDeclarations: true # Since clang-format 16, the equivalent value is LexicographicNumeric
|
||||
SpaceAfterTemplateKeyword: false
|
||||
StatementMacros:
|
||||
- TR_DEFINE_QUARK
|
||||
WhitespaceSensitiveMacros:
|
||||
- API_HEADER
|
||||
- API_HEADER_CRYPT
|
||||
---
|
||||
Language: ObjC
|
||||
|
||||
|
|
|
@ -512,11 +512,10 @@ private:
|
|||
fmt::arg("error_code", static_cast<int>(rc))));
|
||||
return {};
|
||||
}
|
||||
auto const info_uniq = std::unique_ptr<addrinfo, void (*)(addrinfo*)>{ info,
|
||||
[](addrinfo* p) // MSVC forced my hands
|
||||
{
|
||||
freeaddrinfo(p);
|
||||
} };
|
||||
auto const info_uniq = std::unique_ptr<addrinfo, void (*)(addrinfo*)>{
|
||||
info,
|
||||
[](addrinfo* p) { freeaddrinfo(p); }, // MSVC forced me to write this lambda wrapper
|
||||
};
|
||||
|
||||
// N.B. getaddrinfo() will return IPv4-mapped addresses by default on macOS
|
||||
auto socket_address = tr_socket_address::from_sockaddr(info->ai_addr);
|
||||
|
|
Loading…
Reference in a new issue