mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
clang-tidy: fix performance-trivially-destructible
warnings
This commit is contained in:
@@ -17,7 +17,6 @@ modernize-*,\
|
|||||||
-modernize-use-trailing-return-type,\
|
-modernize-use-trailing-return-type,\
|
||||||
-modernize-use-transparent-functors,\
|
-modernize-use-transparent-functors,\
|
||||||
performance-*,\
|
performance-*,\
|
||||||
-performance-trivially-destructible,\
|
|
||||||
readability-*,\
|
readability-*,\
|
||||||
-readability-convert-member-functions-to-static,\
|
-readability-convert-member-functions-to-static,\
|
||||||
-readability-function-size,\
|
-readability-function-size,\
|
||||||
|
@@ -36,8 +36,6 @@ void Base32Encode5(const unsigned char src[5], char dst[8])
|
|||||||
|
|
||||||
cmBase32Encoder::cmBase32Encoder() = default;
|
cmBase32Encoder::cmBase32Encoder() = default;
|
||||||
|
|
||||||
cmBase32Encoder::~cmBase32Encoder() = default;
|
|
||||||
|
|
||||||
std::string cmBase32Encoder::encodeString(const unsigned char* input,
|
std::string cmBase32Encoder::encodeString(const unsigned char* input,
|
||||||
size_t len, bool padding)
|
size_t len, bool padding)
|
||||||
{
|
{
|
||||||
|
@@ -19,7 +19,7 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
cmBase32Encoder();
|
cmBase32Encoder();
|
||||||
~cmBase32Encoder();
|
~cmBase32Encoder() = default;
|
||||||
|
|
||||||
// Encodes the given input byte sequence into a string
|
// Encodes the given input byte sequence into a string
|
||||||
// @arg input Input data pointer
|
// @arg input Input data pointer
|
||||||
|
@@ -12,8 +12,6 @@ cmConsoleBuf::cmConsoleBuf()
|
|||||||
cmConsoleBuf::cmConsoleBuf() = default;
|
cmConsoleBuf::cmConsoleBuf() = default;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cmConsoleBuf::~cmConsoleBuf() = default;
|
|
||||||
|
|
||||||
void cmConsoleBuf::SetUTF8Pipes()
|
void cmConsoleBuf::SetUTF8Pipes()
|
||||||
{
|
{
|
||||||
#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
|
#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
|
||||||
|
@@ -16,7 +16,7 @@ class cmConsoleBuf
|
|||||||
#endif
|
#endif
|
||||||
public:
|
public:
|
||||||
cmConsoleBuf();
|
cmConsoleBuf();
|
||||||
~cmConsoleBuf();
|
~cmConsoleBuf() = default;
|
||||||
cmConsoleBuf(cmConsoleBuf const&) = delete;
|
cmConsoleBuf(cmConsoleBuf const&) = delete;
|
||||||
cmConsoleBuf& operator=(cmConsoleBuf const&) = delete;
|
cmConsoleBuf& operator=(cmConsoleBuf const&) = delete;
|
||||||
void SetUTF8Pipes();
|
void SetUTF8Pipes();
|
||||||
|
@@ -145,10 +145,7 @@ cmFileLockResult cmFileLockPool::ScopePool::Release(
|
|||||||
bool cmFileLockPool::ScopePool::IsAlreadyLocked(
|
bool cmFileLockPool::ScopePool::IsAlreadyLocked(
|
||||||
const std::string& filename) const
|
const std::string& filename) const
|
||||||
{
|
{
|
||||||
for (auto const& lock : this->Locks) {
|
return std::any_of(
|
||||||
if (lock.IsLocked(filename)) {
|
this->Locks.begin(), this->Locks.end(),
|
||||||
return true;
|
[&filename](auto const& lock) { return lock.IsLocked(filename); });
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
@@ -51,8 +51,6 @@ cmProcessOutput::cmProcessOutput(Encoding encoding, unsigned int maxSize)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
cmProcessOutput::~cmProcessOutput() = default;
|
|
||||||
|
|
||||||
bool cmProcessOutput::DecodeText(std::string raw, std::string& decoded,
|
bool cmProcessOutput::DecodeText(std::string raw, std::string& decoded,
|
||||||
size_t id)
|
size_t id)
|
||||||
{
|
{
|
||||||
|
@@ -47,7 +47,7 @@ public:
|
|||||||
* 0 as \a maxSize.
|
* 0 as \a maxSize.
|
||||||
*/
|
*/
|
||||||
cmProcessOutput(Encoding encoding = Auto, unsigned int maxSize = 1024);
|
cmProcessOutput(Encoding encoding = Auto, unsigned int maxSize = 1024);
|
||||||
~cmProcessOutput();
|
~cmProcessOutput() = default;
|
||||||
/**
|
/**
|
||||||
* Decode \a raw string using external encoding to internal
|
* Decode \a raw string using external encoding to internal
|
||||||
* encoding in \a decoded.
|
* encoding in \a decoded.
|
||||||
|
@@ -36,8 +36,6 @@ cmQtAutoGenerator::Logger::Logger()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cmQtAutoGenerator::Logger::~Logger() = default;
|
|
||||||
|
|
||||||
void cmQtAutoGenerator::Logger::RaiseVerbosity(unsigned int value)
|
void cmQtAutoGenerator::Logger::RaiseVerbosity(unsigned int value)
|
||||||
{
|
{
|
||||||
if (this->Verbosity_ < value) {
|
if (this->Verbosity_ < value) {
|
||||||
|
@@ -31,7 +31,7 @@ public:
|
|||||||
public:
|
public:
|
||||||
// -- Construction
|
// -- Construction
|
||||||
Logger();
|
Logger();
|
||||||
~Logger();
|
~Logger() = default;
|
||||||
// -- Verbosity
|
// -- Verbosity
|
||||||
unsigned int Verbosity() const { return this->Verbosity_; }
|
unsigned int Verbosity() const { return this->Verbosity_; }
|
||||||
void SetVerbosity(unsigned int value) { this->Verbosity_ = value; }
|
void SetVerbosity(unsigned int value) { this->Verbosity_ = value; }
|
||||||
|
Reference in New Issue
Block a user