summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2021-01-22 15:37:26 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2021-01-27 13:45:44 (GMT)
commit4470eb5179d6ccbe5e31cec758546e820752f2d8 (patch)
tree4db16d6c3a8cb6cd5448074a64cbf2854080586e
parent4f396e6528ae6bfc4b847fa7d67d8e24a3dd4933 (diff)
downloadCMake-4470eb5179d6ccbe5e31cec758546e820752f2d8.zip
CMake-4470eb5179d6ccbe5e31cec758546e820752f2d8.tar.gz
CMake-4470eb5179d6ccbe5e31cec758546e820752f2d8.tar.bz2
clang-tidy: fix `performance-trivially-destructible` warnings
-rw-r--r--.clang-tidy1
-rw-r--r--Source/cmBase32.cxx2
-rw-r--r--Source/cmBase32.h2
-rw-r--r--Source/cmConsoleBuf.cxx2
-rw-r--r--Source/cmConsoleBuf.h2
-rw-r--r--Source/cmFileLockPool.cxx9
-rw-r--r--Source/cmProcessOutput.cxx2
-rw-r--r--Source/cmProcessOutput.h2
-rw-r--r--Source/cmQtAutoGenerator.cxx2
-rw-r--r--Source/cmQtAutoGenerator.h2
10 files changed, 7 insertions, 19 deletions
diff --git a/.clang-tidy b/.clang-tidy
index 8e8ebda..ccb36ae 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -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,\
diff --git a/Source/cmBase32.cxx b/Source/cmBase32.cxx
index 80ada47..a9c15c2 100644
--- a/Source/cmBase32.cxx
+++ b/Source/cmBase32.cxx
@@ -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)
{
diff --git a/Source/cmBase32.h b/Source/cmBase32.h
index 726f45d..25f7ab7 100644
--- a/Source/cmBase32.h
+++ b/Source/cmBase32.h
@@ -19,7 +19,7 @@ public:
public:
cmBase32Encoder();
- ~cmBase32Encoder();
+ ~cmBase32Encoder() = default;
// Encodes the given input byte sequence into a string
// @arg input Input data pointer
diff --git a/Source/cmConsoleBuf.cxx b/Source/cmConsoleBuf.cxx
index 70be481..8ce9ebc 100644
--- a/Source/cmConsoleBuf.cxx
+++ b/Source/cmConsoleBuf.cxx
@@ -12,8 +12,6 @@ cmConsoleBuf::cmConsoleBuf()
cmConsoleBuf::cmConsoleBuf() = default;
#endif
-cmConsoleBuf::~cmConsoleBuf() = default;
-
void cmConsoleBuf::SetUTF8Pipes()
{
#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
diff --git a/Source/cmConsoleBuf.h b/Source/cmConsoleBuf.h
index 3564598..0a6d3b5 100644
--- a/Source/cmConsoleBuf.h
+++ b/Source/cmConsoleBuf.h
@@ -16,7 +16,7 @@ class cmConsoleBuf
#endif
public:
cmConsoleBuf();
- ~cmConsoleBuf();
+ ~cmConsoleBuf() = default;
cmConsoleBuf(cmConsoleBuf const&) = delete;
cmConsoleBuf& operator=(cmConsoleBuf const&) = delete;
void SetUTF8Pipes();
diff --git a/Source/cmFileLockPool.cxx b/Source/cmFileLockPool.cxx
index e1f6e94..4ca924b 100644
--- a/Source/cmFileLockPool.cxx
+++ b/Source/cmFileLockPool.cxx
@@ -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); });
}
diff --git a/Source/cmProcessOutput.cxx b/Source/cmProcessOutput.cxx
index 2d2676e..10c4215 100644
--- a/Source/cmProcessOutput.cxx
+++ b/Source/cmProcessOutput.cxx
@@ -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)
{
diff --git a/Source/cmProcessOutput.h b/Source/cmProcessOutput.h
index a1f73bd..8cee987 100644
--- a/Source/cmProcessOutput.h
+++ b/Source/cmProcessOutput.h
@@ -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.
diff --git a/Source/cmQtAutoGenerator.cxx b/Source/cmQtAutoGenerator.cxx
index ebb6bd7..6e88e26 100644
--- a/Source/cmQtAutoGenerator.cxx
+++ b/Source/cmQtAutoGenerator.cxx
@@ -36,8 +36,6 @@ cmQtAutoGenerator::Logger::Logger()
}
}
-cmQtAutoGenerator::Logger::~Logger() = default;
-
void cmQtAutoGenerator::Logger::RaiseVerbosity(unsigned int value)
{
if (this->Verbosity_ < value) {
diff --git a/Source/cmQtAutoGenerator.h b/Source/cmQtAutoGenerator.h
index 53fbd69..af0b76d 100644
--- a/Source/cmQtAutoGenerator.h
+++ b/Source/cmQtAutoGenerator.h
@@ -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; }