mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
build: lint header files with clang-tidy (#7527)
* build: clang-tidy headers when building libtransmission
* chore: revert `= default` workaround
It was introduced in 6909ec0bad to fix build issues with macOS 10.14. We
no longer support that version.
* fix: clang-tidy warnings for libtransmission
* build: clang-tidy headers when building tests
* fix: clang-tidy warnings for tests
* build: clang-tidy headers when building qt
* code review: don't manually edit mime-types.h
* code review: unify variable naming for static private members
This commit is contained in:
@@ -31,7 +31,7 @@ public:
|
||||
}
|
||||
|
||||
explicit tr_interned_string(char const* c_str)
|
||||
: tr_interned_string{ std::string_view{ c_str ? c_str : "" } }
|
||||
: tr_interned_string{ std::string_view{ c_str != nullptr ? c_str : "" } }
|
||||
{
|
||||
}
|
||||
|
||||
@@ -157,6 +157,7 @@ public:
|
||||
return *this != std::string_view{ that != nullptr ? that : "" };
|
||||
}
|
||||
|
||||
// NOLINTNEXTLINE(google-explicit-constructor)
|
||||
[[nodiscard]] constexpr operator std::string_view() const noexcept
|
||||
{
|
||||
return sv();
|
||||
@@ -164,7 +165,7 @@ public:
|
||||
|
||||
private:
|
||||
tr_quark quark_ = TR_KEY_NONE;
|
||||
std::string_view sv_ = "";
|
||||
std::string_view sv_;
|
||||
};
|
||||
|
||||
template<>
|
||||
|
||||
Reference in New Issue
Block a user