File tree Expand file tree Collapse file tree 1 file changed +29
-9
lines changed Expand file tree Collapse file tree 1 file changed +29
-9
lines changed Original file line number Diff line number Diff line change @@ -45,24 +45,44 @@ public Q_SLOTS:
45
45
int icon_size;
46
46
47
47
static bool CompareStringsAscending (GameInfo a, GameInfo b, int columnIndex) {
48
- if (columnIndex == 1 ) {
48
+ switch (columnIndex) {
49
+ case 1 :
49
50
return a.name < b.name ;
50
- } else if (columnIndex == 2 ) {
51
+ case 2 :
51
52
return a.serial < b.serial ;
52
- } else if (columnIndex == 3 ) {
53
+ case 3 :
54
+ return a.region < b.region ;
55
+ case 4 :
53
56
return a.fw < b.fw ;
57
+ case 5 :
58
+ return a.size < b.size ;
59
+ case 6 :
60
+ return a.version < b.version ;
61
+ case 7 :
62
+ return a.path < b.path ;
63
+ default :
64
+ return false ;
54
65
}
55
- return false ;
56
66
}
57
67
58
68
static bool CompareStringsDescending (GameInfo a, GameInfo b, int columnIndex) {
59
- if (columnIndex == 1 ) {
69
+ switch (columnIndex) {
70
+ case 1 :
60
71
return a.name > b.name ;
61
- } else if (columnIndex == 2 ) {
72
+ case 2 :
62
73
return a.serial > b.serial ;
63
- } else if (columnIndex == 3 ) {
74
+ case 3 :
75
+ return a.region > b.region ;
76
+ case 4 :
64
77
return a.fw > b.fw ;
78
+ case 5 :
79
+ return a.size > b.size ;
80
+ case 6 :
81
+ return a.version > b.version ;
82
+ case 7 :
83
+ return a.path > b.path ;
84
+ default :
85
+ return false ;
65
86
}
66
- return false ;
67
87
}
68
- };
88
+ };
You can’t perform that action at this time.
0 commit comments