summaryrefslogtreecommitdiff
path: root/ui/sorting.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:12:17 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:12:17 +0200
commitb654dbfa5f3e4a4d02f72023f7c5895635aa6396 (patch)
tree8c1dfe7f638c0fc7afc1d08bc2fc0fd0f8646e5e /ui/sorting.h
parent3.17 (diff)
downloadFreeFileSync-b654dbfa5f3e4a4d02f72023f7c5895635aa6396.tar.gz
FreeFileSync-b654dbfa5f3e4a4d02f72023f7c5895635aa6396.tar.bz2
FreeFileSync-b654dbfa5f3e4a4d02f72023f7c5895635aa6396.zip
3.18
Diffstat (limited to 'ui/sorting.h')
-rw-r--r--ui/sorting.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/ui/sorting.h b/ui/sorting.h
index 52921f84..28f0b8e4 100644
--- a/ui/sorting.h
+++ b/ui/sorting.h
@@ -56,7 +56,7 @@ struct Compare<false>
template <bool ascending, SelectedSide side>
inline
-bool sortByFileName(const FileSystemObject& a, const FileSystemObject& b)
+bool lessShortFileName(const FileSystemObject& a, const FileSystemObject& b)
{
//presort types: first files, then directories then empty rows
if (a.isEmpty<side>())
@@ -84,7 +84,7 @@ bool sortByFileName(const FileSystemObject& a, const FileSystemObject& b)
template <bool ascending, SelectedSide side>
-bool sortByRelativeName(const FileSystemObject& a, const FileSystemObject& b)
+bool lessRelativeName(const FileSystemObject& a, const FileSystemObject& b)
{
if (a.isEmpty<side>())
return false; //empty rows always last
@@ -120,7 +120,7 @@ bool sortByRelativeName(const FileSystemObject& a, const FileSystemObject& b)
template <bool ascending, SelectedSide side>
inline
-bool sortByFileSize(const FileSystemObject& a, const FileSystemObject& b)
+bool lessFilesize(const FileSystemObject& a, const FileSystemObject& b)
{
//empty rows always last
if (a.isEmpty<side>())
@@ -153,7 +153,7 @@ bool sortByFileSize(const FileSystemObject& a, const FileSystemObject& b)
template <bool ascending, SelectedSide side>
inline
-bool sortByDate(const FileSystemObject& a, const FileSystemObject& b)
+bool lessFiletime(const FileSystemObject& a, const FileSystemObject& b)
{
if (a.isEmpty<side>())
return false; //empty rows always last
@@ -182,7 +182,7 @@ bool sortByDate(const FileSystemObject& a, const FileSystemObject& b)
template <bool ascending, SelectedSide side>
inline
-bool sortByExtension(const FileSystemObject& a, const FileSystemObject& b)
+bool lessExtension(const FileSystemObject& a, const FileSystemObject& b)
{
if (a.isEmpty<side>())
return false; //empty rows always last
@@ -198,13 +198,13 @@ bool sortByExtension(const FileSystemObject& a, const FileSystemObject& b)
else if (fileObjB == NULL)
return true; //directories last
- return Compare<ascending>().isSmallerThan(fileObjA->getExtension<side>(), fileObjB->getExtension<side>());
+ return Compare<ascending>().isSmallerThan(cmpFileName(fileObjA->getExtension<side>(), fileObjB->getExtension<side>()), 0);
}
template <bool ascending>
inline
-bool sortByCmpResult(const FileSystemObject& a, const FileSystemObject& b)
+bool lessCmpResult(const FileSystemObject& a, const FileSystemObject& b)
{
//presort result: equal shall appear at end of list
if (a.getCategory() == FILE_EQUAL)
@@ -218,7 +218,7 @@ bool sortByCmpResult(const FileSystemObject& a, const FileSystemObject& b)
template <bool ascending>
inline
-bool sortBySyncDirection(const FileSystemObject& a, const FileSystemObject& b)
+bool lessSyncDirection(const FileSystemObject& a, const FileSystemObject& b)
{
return Compare<ascending>().isSmallerThan(a.getSyncOperation(), b.getSyncOperation());
}
bgstack15