return std::tie(a.dir, a.startx, a.starty) < std::tie(b.dir, b.startx, b.starty);
Show differencesHistory of post edits
#ActualCornstalks
Posted 18 December 2012 - 11:02 AM
If you're using C++11, there's std::tie and you can just do:
#2Cornstalks
Posted 18 December 2012 - 11:01 AM
If you're using C++11, there's std::tie and you can just do:
return std::tie(a.dir, a.startx, a.starty) < std::tie(b.dir, b.startx, b.starty);
#1Cornstalks
Posted 18 December 2012 - 11:00 AM
If you're using C++11, there's std::tie and you can just do:
return std::tie(a.dir, a.startx, a.starty) < std::tie(b.dir, b.startx, b.starty);