Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74530 - trunk/boost/filesystem/v3
From: dnljms_at_[hidden]
Date: 2011-09-22 19:56:13


Author: danieljames
Date: 2011-09-22 19:56:12 EDT (Thu, 22 Sep 2011)
New Revision: 74530
URL: http://svn.boost.org/trac/boost/changeset/74530

Log:
Remove some unnecessary checks in path equality.
Text files modified:
   trunk/boost/filesystem/v3/path.hpp | 2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

Modified: trunk/boost/filesystem/v3/path.hpp
==============================================================================
--- trunk/boost/filesystem/v3/path.hpp (original)
+++ trunk/boost/filesystem/v3/path.hpp 2011-09-22 19:56:12 EDT (Thu, 22 Sep 2011)
@@ -560,7 +560,7 @@
     const path::value_type* l(lhs.c_str());
     while ((*l == *rhs || (*l == L'\\' && *rhs == L'/') || (*l == L'/' && *rhs == L'\\'))
       && *l) { ++l; ++rhs; }
- return *l == *rhs || (*l == L'\\' && *rhs == L'/') || (*l == L'/' && *rhs == L'\\');
+ return *l == *rhs;
   }
   inline bool operator==(const path& lhs, const path& rhs) { return lhs == rhs.c_str(); }
   inline bool operator==(const path& lhs, const path::string_type& rhs) { return lhs == rhs.c_str(); }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk