forked from ggml-org/llama.cpp
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit 4314e56
server : use lambda instead of std::bind (ggml-org#11507)
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.md 1 parent 496e5bf commit 4314e56
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