]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
include/CompatSet: use std::string_view in struct Feature
authorMax Kellermann <max.kellermann@ionos.com>
Wed, 16 Oct 2024 17:53:20 +0000 (19:53 +0200)
committerMax Kellermann <max.kellermann@ionos.com>
Thu, 28 May 2026 06:22:35 +0000 (08:22 +0200)
commit5a45cd213e52fc3dabcccc5ba85706205468a732
tree26c2c3a584d11a6cd7226f9e7d5f6b4b36d6efba
parent8023e9f5dfd63db8f9dee79ba366ffcdb066e2e6
include/CompatSet: use std::string_view in struct Feature

Almost all callers pass a C string (in temporary Feature instances),
only `CompatSetHandler::handle()` passes a `std::string` reference.

Allocating a new `std::string` is useless overhead.  This patch
reduces the binary size by 21 kB.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
src/include/CompatSet.h