]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw/dbstore: DBOpPrepareInfo::query_str is a view 45109/head
authorCasey Bodley <cbodley@redhat.com>
Mon, 21 Feb 2022 17:07:26 +0000 (12:07 -0500)
committerCasey Bodley <cbodley@redhat.com>
Mon, 21 Feb 2022 18:18:25 +0000 (13:18 -0500)
commit146a92612b6dca6b777e5ea8093b4585002df8ef
tree8964ac325b5da8a093b782d75e486962b9013af6
parent673516826d90d6d4c6c0841ab8f68fa0f557ecec
rgw/dbstore: DBOpPrepareInfo::query_str is a view

in `SQLiteDB::InitPrepareParams()`, `DBOpInfo::query_str` is assigned to
`DBOpPrepareInfo::query_str`:

  p_params.op.query_str = params->op.query_str;

by making `DBOpPrepareInfo::query_str` a view, we avoid allocating a
copy of the `std::string`

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/store/dbstore/common/dbstore.h