Skip to content

Commit e7a4efc

Browse files
committed
Use lambda for sort comparer
1 parent 9f2dfc6 commit e7a4efc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

desktop-ui/emulator/emulator.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ struct Emulator {
3434
virtual auto arcade() -> bool { return false; }
3535
virtual auto group() -> string { return manufacturer; }
3636
virtual auto portMenu(Menu& portMenu, ares::Node::Port port) -> void {}
37-
static auto emuComparer(std::shared_ptr<Emulator> a, std::shared_ptr<Emulator> b) -> bool { return (a->name < b->name); }
3837

3938
struct Firmware {
4039
string type;

desktop-ui/emulator/emulators.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,5 +259,7 @@ auto Emulator::construct() -> void {
259259
emulators.push_back(std::make_shared<ZXSpectrum128>());
260260
#endif
261261

262-
std::sort(emulators.begin(), emulators.end(), emuComparer);
262+
std::sort(emulators.begin(), emulators.end(), [](std::shared_ptr<Emulator> a, std::shared_ptr<Emulator> b) {
263+
return (a->name < b->name);
264+
});
263265
}

0 commit comments

Comments
 (0)