aboutsummaryrefslogtreecommitdiff
path: root/common/fs.cpp
diff options
context:
space:
mode:
authorMax Horn2008-02-20 21:49:05 +0000
committerMax Horn2008-02-20 21:49:05 +0000
commita905de7deb84420e911ad26e7861ea31873a2eb9 (patch)
tree2a9ce66c530bc8a4c8e3402129abe7bc6e7992f3 /common/fs.cpp
parent065f8f541958ec5c525a2dfde313f56777406e86 (diff)
downloadscummvm-rg350-a905de7deb84420e911ad26e7861ea31873a2eb9.tar.gz
scummvm-rg350-a905de7deb84420e911ad26e7861ea31873a2eb9.tar.bz2
scummvm-rg350-a905de7deb84420e911ad26e7861ea31873a2eb9.zip
Fix code formatting and simplify code a little bit
svn-id: r30912
Diffstat (limited to 'common/fs.cpp')
-rw-r--r--common/fs.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/common/fs.cpp b/common/fs.cpp
index 1c93d82b2b..94351c7720 100644
--- a/common/fs.cpp
+++ b/common/fs.cpp
@@ -69,12 +69,9 @@ FilesystemNode &FilesystemNode::operator= (const FilesystemNode &node) {
return *this;
}
-bool FilesystemNode::operator<(const FilesystemNode& node) const
-{
- if (isDirectory() && !node.isDirectory())
- return true;
- if (!isDirectory() && node.isDirectory())
- return false;
+bool FilesystemNode::operator<(const FilesystemNode& node) const {
+ if (isDirectory() != node.isDirectory())
+ return isDirectory();
return scumm_stricmp(getDisplayName().c_str(), node.getDisplayName().c_str()) < 0;
}