Commit a8240b5
committed
server : use lambda instead of std::bind
This commit replaces the two usages of `std::bind` in favor of lambdas for
the callback functions for `callback_new_task` and
`callback_update_slots`.
The motivation for this changes is consistency with the rest of the code
in server.cpp (lambdas are used for all other callbacks/handlers). Also
lambdas are more readable (perhaps this is subjective) but also they are
recommended over `std::bind` in modern C++.
Ref: https://github.com/LithoCoders/dailycpp/blob/master/EffectiveModernC%2B%2B/chapter6/Item34_Prefer_lambdas_to_std::bind.md1 parent e044976 commit a8240b5
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4387 | 4387 | | |
4388 | 4388 | | |
4389 | 4389 | | |
4390 | | - | |
4391 | | - | |
| 4390 | + | |
| 4391 | + | |
| 4392 | + | |
4392 | 4393 | | |
4393 | | - | |
4394 | | - | |
| 4394 | + | |
| 4395 | + | |
| 4396 | + | |
4395 | 4397 | | |
4396 | 4398 | | |
4397 | 4399 | | |
| |||
0 commit comments