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(); SK.groupOrder.Clear();
for(int i = 0; i < SK.group.n; i++) for(int i = 0; i < SK.group.n; i++)
SK.groupOrder.Add(&SK.group.elem[i].h); 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) { [](const hGroup &ha, const hGroup &hb) {
return SK.GetGroup(ha)->order < SK.GetGroup(hb)->order; return SK.GetGroup(ha)->order < SK.GetGroup(hb)->order;
}); });

View File

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