From 01eb8253196672c969a39587e90b49321a182428 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:19:14 +0200 Subject: 5.1 --- ui/sorting.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'ui/sorting.h') diff --git a/ui/sorting.h b/ui/sorting.h index 15e04a62..807a9ce3 100644 --- a/ui/sorting.h +++ b/ui/sorting.h @@ -19,16 +19,16 @@ namespace { struct CompileTimeReminder : public FSObjectVisitor { - virtual void visit(const FileMapping& fileObj ) {} + virtual void visit(const FileMapping& fileObj) {} virtual void visit(const SymLinkMapping& linkObj) {} - virtual void visit(const DirMapping& dirObj ) {} + virtual void visit(const DirMapping& dirObj ) {} } checkDymanicCasts; //just a compile-time reminder to check dynamic casts in this file } inline bool isDirectoryMapping(const FileSystemObject& fsObj) { - return dynamic_cast(&fsObj) != NULL; + return dynamic_cast(&fsObj) != nullptr; } @@ -97,8 +97,8 @@ bool lessFilesize(const FileSystemObject& a, const FileSystemObject& b) else if (b.isEmpty()) return true; - const bool isDirA = dynamic_cast(&a) != NULL; - const bool isDirB = dynamic_cast(&b) != NULL; + const bool isDirA = dynamic_cast(&a) != nullptr; + const bool isDirB = dynamic_cast(&b) != nullptr; //directories second last if (isDirA) @@ -110,9 +110,9 @@ bool lessFilesize(const FileSystemObject& a, const FileSystemObject& b) const FileMapping* fileObjB = dynamic_cast(&b); //then symlinks - if (fileObjA == NULL) + if (!fileObjA) return false; - else if (fileObjB == NULL) + else if (!fileObjB) return true; //return list beginning with largest files first @@ -160,9 +160,9 @@ bool lessExtension(const FileSystemObject& a, const FileSystemObject& b) const FileMapping* fileObjA = dynamic_cast(&a); const FileMapping* fileObjB = dynamic_cast(&b); - if (fileObjA == NULL) + if (!fileObjA) return false; //directories last - else if (fileObjB == NULL) + else if (!fileObjB) return true; //directories last return makeSortDirection(LessFilename(), Int2Type())(fileObjA->getExtension(), fileObjB->getExtension()); -- cgit