summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-01 21:29:53 (GMT)
committerBrad King <brad.king@kitware.com>2016-06-02 12:24:04 (GMT)
commit7f6b8d3399dd841b0d29bf74d2b31021738c4ef8 (patch)
tree9b9184028cba2f16fdcc1c10ac5fb5467f09bff7 /Source/cmSystemTools.cxx
parentd6754d37d593a0189809dcf98bc4fdf3a609f0a3 (diff)
downloadCMake-7f6b8d3399dd841b0d29bf74d2b31021738c4ef8.zip
CMake-7f6b8d3399dd841b0d29bf74d2b31021738c4ef8.tar.gz
CMake-7f6b8d3399dd841b0d29bf74d2b31021738c4ef8.tar.bz2
Simplify boolean expressions
Use clang-tidy's readability-simplify-boolean-expr checker. After applying the fix-its, revise all changes *very* carefully. Be aware of false positives and invalid changes.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 7dece47..7156948 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2108,11 +2108,8 @@ bool cmSystemTools::GuessLibrarySOName(std::string const& fullPath,
// If the symlink points at an extended version of the same name
// assume it is the soname.
std::string name = cmSystemTools::GetFilenameName(fullPath);
- if (soname.length() > name.length() &&
- soname.substr(0, name.length()) == name) {
- return true;
- }
- return false;
+ return soname.length() > name.length() &&
+ soname.compare(0, name.length(), name) == 0;
}
bool cmSystemTools::GuessLibraryInstallName(std::string const& fullPath,