summaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-08 18:46:33 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-08 23:41:37 +0300
commitf2f7f680a135bbbc94f29268a92e77cc18e5f238 (patch)
tree8a0269a9d4e670dc810cbb14ca6139b358b3ab35 /src/fs
parent763e91044a4e9c8905ee082457cb42da36a38cc0 (diff)
downloadmv-f2f7f680a135bbbc94f29268a92e77cc18e5f238.tar.gz
mv-f2f7f680a135bbbc94f29268a92e77cc18e5f238.tar.bz2
mv-f2f7f680a135bbbc94f29268a92e77cc18e5f238.tar.xz
mv-f2f7f680a135bbbc94f29268a92e77cc18e5f238.zip
Replace ext.compare to direct string comparison.
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/virtfs/tools.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fs/virtfs/tools.cpp b/src/fs/virtfs/tools.cpp
index b0d6ce067..7e572ecc3 100644
--- a/src/fs/virtfs/tools.cpp
+++ b/src/fs/virtfs/tools.cpp
@@ -47,7 +47,7 @@ namespace VirtFs
const size_t len = str.size();
if (len > ext.length() &&
- (ext.compare(str.substr(len - ext.length())) == 0))
+ ext == str.substr(len - ext.length()))
{
const std::string file = path + str;
const std::string realPath = VirtFs::getRealDir(file);
@@ -66,7 +66,7 @@ namespace VirtFs
const std::string str = *i;
const size_t len = str.size();
if (len > ext.length() &&
- (ext.compare(str.substr(len - ext.length())) == 0))
+ ext == str.substr(len - ext.length()))
{
const std::string file = path + str;
const std::string realPath = VirtFs::getRealDir(file);