File tree Expand file tree Collapse file tree 3 files changed +6
-18
lines changed
source/Plugins/LanguageRuntime/ObjC Expand file tree Collapse file tree 3 files changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -48,9 +48,8 @@ class CompilerDeclContext {
48
48
explicit operator bool () const { return IsValid (); }
49
49
50
50
bool operator <(const CompilerDeclContext &rhs) const {
51
- if (m_type_system == rhs.m_type_system )
52
- return m_opaque_decl_ctx < rhs.m_opaque_decl_ctx ;
53
- return m_type_system < rhs.m_type_system ;
51
+ return std::tie (m_type_system, m_opaque_decl_ctx) <
52
+ std::tie (rhs.m_type_system , rhs.m_opaque_decl_ctx );
54
53
}
55
54
56
55
bool IsValid () const {
Original file line number Diff line number Diff line change @@ -30,11 +30,8 @@ struct CoreFileMemoryRange {
30
30
}
31
31
32
32
bool operator <(const CoreFileMemoryRange &rhs) const {
33
- if (range < rhs.range )
34
- return true ;
35
- if (range == rhs.range )
36
- return lldb_permissions < rhs.lldb_permissions ;
37
- return false ;
33
+ return std::tie (range, lldb_permissions) <
34
+ std::tie (rhs.range , rhs.lldb_permissions );
38
35
}
39
36
40
37
std::string Dump () const {
Original file line number Diff line number Diff line change @@ -386,16 +386,8 @@ class ObjCLanguageRuntime : public LanguageRuntime {
386
386
}
387
387
388
388
bool operator <(const ClassAndSel &rhs) const {
389
- if (class_addr < rhs.class_addr )
390
- return true ;
391
- else if (class_addr > rhs.class_addr )
392
- return false ;
393
- else {
394
- if (sel_addr < rhs.sel_addr )
395
- return true ;
396
- else
397
- return false ;
398
- }
389
+ return std::tie (class_addr, sel_addr) <
390
+ std::tie (rhs.class_addr , rhs.sel_addr );
399
391
}
400
392
401
393
lldb::addr_t class_addr = LLDB_INVALID_ADDRESS;
You can’t perform that action at this time.
0 commit comments