summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-06-03 14:45:40 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-06-03 14:45:40 (GMT)
commit811831a958c91404193cc0a35d2d90f8351eb51c (patch)
tree589c888e14f727eb48adb6f0fa7f3f83cace3f65 /Source/cmSystemTools.cxx
parent8b289db739c8d0a288e532c560b6dbcf4bd67c30 (diff)
parent7f6b8d3399dd841b0d29bf74d2b31021738c4ef8 (diff)
downloadCMake-811831a958c91404193cc0a35d2d90f8351eb51c.zip
CMake-811831a958c91404193cc0a35d2d90f8351eb51c.tar.gz
CMake-811831a958c91404193cc0a35d2d90f8351eb51c.tar.bz2
Merge topic 'simplify-boolean-expressions'
7f6b8d33 Simplify boolean expressions
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 99d8569..08e0c30 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2115,11 +2115,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,