summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick Donnelly <pdonnell@ibm.com>2024-10-22 03:00:21 +0200
committerPatrick Donnelly <pdonnell@ibm.com>2024-10-22 03:00:21 +0200
commitee6523b618e7abe21cd2346f828f57cf150de5b9 (patch)
tree1fc00512b3f31e27cc0c1090a18f1890e9504323 /src
parentMerge PR #60174 into main (diff)
parentmsg/async/ProtocolV2: pass `desc` as `std::string_view` to write() (diff)
downloadceph-ee6523b618e7abe21cd2346f828f57cf150de5b9.tar.xz
ceph-ee6523b618e7abe21cd2346f828f57cf150de5b9.zip
Merge PR #60106 into main
* refs/pull/60106/head: msg/async/ProtocolV2: pass `desc` as `std::string_view` to write() Reviewed-by: Patrick Donnelly <pdonnell@ibm.com> Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/msg/async/ProtocolV2.cc4
-rw-r--r--src/msg/async/ProtocolV2.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/msg/async/ProtocolV2.cc b/src/msg/async/ProtocolV2.cc
index 79fdf6c30a3..ed6f93cdd48 100644
--- a/src/msg/async/ProtocolV2.cc
+++ b/src/msg/async/ProtocolV2.cc
@@ -796,7 +796,7 @@ CtPtr ProtocolV2::read(CONTINUATION_RXBPTR_TYPE<ProtocolV2> &next,
}
template <class F>
-CtPtr ProtocolV2::write(const std::string &desc,
+CtPtr ProtocolV2::write(std::string_view desc,
CONTINUATION_TYPE<ProtocolV2> &next,
F &frame) {
ceph::bufferlist bl;
@@ -812,7 +812,7 @@ CtPtr ProtocolV2::write(const std::string &desc,
return write(desc, next, bl);
}
-CtPtr ProtocolV2::write(const std::string &desc,
+CtPtr ProtocolV2::write(std::string_view desc,
CONTINUATION_TYPE<ProtocolV2> &next,
ceph::bufferlist &buffer) {
if (unlikely(pre_auth.enabled)) {
diff --git a/src/msg/async/ProtocolV2.h b/src/msg/async/ProtocolV2.h
index 78e3c49436b..1ee258c4975 100644
--- a/src/msg/async/ProtocolV2.h
+++ b/src/msg/async/ProtocolV2.h
@@ -135,10 +135,10 @@ private:
Ct<ProtocolV2> *read(CONTINUATION_RXBPTR_TYPE<ProtocolV2> &next,
rx_buffer_t&& buffer);
template <class F>
- Ct<ProtocolV2> *write(const std::string &desc,
+ Ct<ProtocolV2> *write(std::string_view desc,
CONTINUATION_TYPE<ProtocolV2> &next,
F &frame);
- Ct<ProtocolV2> *write(const std::string &desc,
+ Ct<ProtocolV2> *write(std::string_view desc,
CONTINUATION_TYPE<ProtocolV2> &next,
ceph::bufferlist &buffer);