Fix engine state ordering
This commit is contained in:
parent
8bed793b48
commit
16cdab6327
@ -1803,6 +1803,7 @@ bool EngineControl::equivalent_states (const EngineControl::State& state1,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// sort active first, then most recently used to the beginning of the list
|
||||||
bool
|
bool
|
||||||
EngineControl::state_sort_cmp (const State &a, const State &b) {
|
EngineControl::state_sort_cmp (const State &a, const State &b) {
|
||||||
if (a->active) {
|
if (a->active) {
|
||||||
@ -1812,7 +1813,7 @@ EngineControl::state_sort_cmp (const State &a, const State &b) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return a->lru < b->lru;
|
return a->lru > b->lru;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user