cleanup: Changes for c++17

This cleanup adjusts the rTorrent code to comply with c++17 standard. It also simplifies various parts of the code.
This commit is contained in:
stickz
2025-01-15 13:27:35 -05:00
committed by Jari Sundell
parent 2e0a417367
commit e7fc891f11
14 changed files with 29 additions and 34 deletions
+2 -2
View File
@@ -16,7 +16,7 @@
namespace core {
// Also add focus thingie here?
struct view_downloads_compare : std::binary_function<Download*, Download*, bool> {
struct view_downloads_compare : std::function<bool (Download*, Download*)> {
view_downloads_compare(const torrent::Object& cmd) :
m_command(cmd) {}
@@ -50,7 +50,7 @@ struct view_downloads_compare : std::binary_function<Download*, Download*, bool>
const torrent::Object& m_command;
};
struct view_downloads_filter : std::unary_function<Download*, bool> {
struct view_downloads_filter : std::function<bool (Download*)> {
view_downloads_filter(const torrent::Object& cmd, const torrent::Object& cmd2) :
m_command(cmd), m_command2(cmd2) {}