-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathrp_file_sorter.cpp
More file actions
39 lines (27 loc) · 927 Bytes
/
Copy pathrp_file_sorter.cpp
File metadata and controls
39 lines (27 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "reporter/impl/tools/rp_file_sorter.hpp"
#include "model_includes/api/mi_file.hpp"
#include "exception/ih/exc_internal_error.hpp"
#include <std_fs>
//------------------------------------------------------------------------------
namespace reporter
{
//------------------------------------------------------------------------------
bool FileSorter::operator()( const File * _l, const File * _r ) const
{
INTERNAL_CHECK_WARRING( _l );
INTERNAL_CHECK_WARRING( _r );
if( _l == nullptr || _r == nullptr )
{
return false;
}
return operator()( *_l, *_r );
}
//------------------------------------------------------------------------------
bool FileSorter::operator()( const File & _l, const File & _r ) const
{
const auto & lPath = _l.getPath();
const auto & rPath = _r.getPath();
return stdfs::less( lPath, rPath );
}
//------------------------------------------------------------------------------
}