]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msg/async/AsyncConnection: do not wrap writeCallback in `std::optional`
authorMax Kellermann <max.kellermann@ionos.com>
Tue, 8 Oct 2024 12:50:02 +0000 (14:50 +0200)
committerMax Kellermann <max.kellermann@ionos.com>
Wed, 9 Oct 2024 21:15:15 +0000 (23:15 +0200)
commitc72dae9b6e4b37c508a3ebb1410172fb7c434e8a
tree93737c4e3ce7471ab65908f2d9422f170c87c45c
parent10a9914f848163a8fd74cdaa130cfb4d082cd45d
msg/async/AsyncConnection: do not wrap writeCallback in `std::optional`

Since `std::function` is nullable and as an `operator bool()`, we can
easily eliminate the `std::optional` overhead.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
src/msg/async/AsyncConnection.cc
src/msg/async/AsyncConnection.h
src/msg/async/ProtocolV1.cc
src/msg/async/ProtocolV2.cc