Simplify. NFC.

pull/420/head
Ryan Pavlik 2018-01-03 19:42:50 -06:00 committed by whitequark
parent 75a09c8b67
commit f885daf752
2 changed files with 2 additions and 4 deletions

View File

@ -147,7 +147,7 @@ void SolveSpaceUI::GenerateAll(Generate type, bool andFindFree, bool genForBBox)
SK.groupOrder.Clear();
for(int i = 0; i < SK.group.n; i++)
SK.groupOrder.Add(&SK.group.elem[i].h);
std::sort(&SK.groupOrder.elem[0], &SK.groupOrder.elem[SK.groupOrder.n],
std::sort(SK.groupOrder.begin(), SK.groupOrder.end(),
[](const hGroup &ha, const hGroup &hb) {
return SK.GetGroup(ha)->order < SK.GetGroup(hb)->order;
});

View File

@ -105,9 +105,7 @@ void System::SolveBySubstitution() {
if(IsDragged(a)) {
// A is being dragged, so A should stay, and B should go
hParam t = a;
a = b;
b = t;
std::swap(a, b);
}
int j;