]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/cmdparse: use string_view for the key
authorKefu Chai <kchai@redhat.com>
Thu, 20 May 2021 02:20:50 +0000 (10:20 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 22 May 2021 00:48:52 +0000 (08:48 +0800)
commitda58cfbeffe104683933ebdc0e0221412d618384
tree826e71fa918cb5976f1fa723042aec20a91dc1d4
parent5276c2a3d0eae8e5f7b7f8efd1bb22f7180d0283
common/cmdparse: use string_view for the key

for better usability and performance. as the main use case of
cmd_getval() and cmd_putval() only uses a literal string for the key.
it's a waste to build a std::string out of it and throw it away after
looking the cmdmap with it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/cmdparse.cc
src/common/cmdparse.h
src/mon/MDSMonitor.cc