Commit 4470eb51 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

clang-tidy: fix `performance-trivially-destructible` warnings

parent 4f396e65
......@@ -17,7 +17,6 @@ modernize-*,\
-modernize-use-trailing-return-type,\
-modernize-use-transparent-functors,\
performance-*,\
-performance-trivially-destructible,\
readability-*,\
-readability-convert-member-functions-to-static,\
-readability-function-size,\
......
......@@ -36,8 +36,6 @@ void Base32Encode5(const unsigned char src[5], char dst[8])
cmBase32Encoder::cmBase32Encoder() = default;
cmBase32Encoder::~cmBase32Encoder() = default;
std::string cmBase32Encoder::encodeString(const unsigned char* input,
size_t len, bool padding)
{
......
......@@ -19,7 +19,7 @@ public:
public:
cmBase32Encoder();
~cmBase32Encoder();
~cmBase32Encoder() = default;
// Encodes the given input byte sequence into a string
// @arg input Input data pointer
......
......@@ -12,8 +12,6 @@ cmConsoleBuf::cmConsoleBuf()
cmConsoleBuf::cmConsoleBuf() = default;
#endif
cmConsoleBuf::~cmConsoleBuf() = default;
void cmConsoleBuf::SetUTF8Pipes()
{
#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
......
......@@ -16,7 +16,7 @@ class cmConsoleBuf
#endif
public:
cmConsoleBuf();
~cmConsoleBuf();
~cmConsoleBuf() = default;
cmConsoleBuf(cmConsoleBuf const&) = delete;
cmConsoleBuf& operator=(cmConsoleBuf const&) = delete;
void SetUTF8Pipes();
......
......@@ -145,10 +145,7 @@ cmFileLockResult cmFileLockPool::ScopePool::Release(
bool cmFileLockPool::ScopePool::IsAlreadyLocked(
const std::string& filename) const
{
for (auto const& lock : this->Locks) {
if (lock.IsLocked(filename)) {
return true;
}
}
return false;
return std::any_of(
this->Locks.begin(), this->Locks.end(),
[&filename](auto const& lock) { return lock.IsLocked(filename); });
}
......@@ -51,8 +51,6 @@ cmProcessOutput::cmProcessOutput(Encoding encoding, unsigned int maxSize)
#endif
}
cmProcessOutput::~cmProcessOutput() = default;
bool cmProcessOutput::DecodeText(std::string raw, std::string& decoded,
size_t id)
{
......
......@@ -47,7 +47,7 @@ public:
* 0 as \a maxSize.
*/
cmProcessOutput(Encoding encoding = Auto, unsigned int maxSize = 1024);
~cmProcessOutput();
~cmProcessOutput() = default;
/**
* Decode \a raw string using external encoding to internal
* encoding in \a decoded.
......
......@@ -36,8 +36,6 @@ cmQtAutoGenerator::Logger::Logger()
}
}
cmQtAutoGenerator::Logger::~Logger() = default;
void cmQtAutoGenerator::Logger::RaiseVerbosity(unsigned int value)
{
if (this->Verbosity_ < value) {
......
......@@ -31,7 +31,7 @@ public:
public:
// -- Construction
Logger();
~Logger();
~Logger() = default;
// -- Verbosity
unsigned int Verbosity() const { return this->Verbosity_; }
void SetVerbosity(unsigned int value) { this->Verbosity_ = value; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment