Remove an always false clause from an if statement.
authorReid Spencer <rspencer@reidspencer.com>
Mon, 13 Dec 2004 07:51:07 +0000 (07:51 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Mon, 13 Dec 2004 07:51:07 +0000 (07:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18885 91177308-0d34-0410-b5e6-96231b3b80d8

lib/System/Unix/Path.cpp
lib/System/Unix/Path.inc

index 4b5ccb934483d620935c4b80a75666cf2b11443a..6e07427608db4a0c80a41180dc981da59d33330b 100644 (file)
@@ -290,7 +290,7 @@ Path::setDirectory(const std::string& a_path) {
   Path save(*this);
   path = a_path;
   size_t last = a_path.size() -1;
-  if (a_path.size() == 0 || a_path[last] != '/')
+  if (a_path[last] != '/')
     path += '/';
   if (!isValid()) {
     path = save.path;
index 4b5ccb934483d620935c4b80a75666cf2b11443a..6e07427608db4a0c80a41180dc981da59d33330b 100644 (file)
@@ -290,7 +290,7 @@ Path::setDirectory(const std::string& a_path) {
   Path save(*this);
   path = a_path;
   size_t last = a_path.size() -1;
-  if (a_path.size() == 0 || a_path[last] != '/')
+  if (a_path[last] != '/')
     path += '/';
   if (!isValid()) {
     path = save.path;