]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common/strtol: expose strict_si_cast(std::string_view, ..)
authorKefu Chai <kchai@redhat.com>
Mon, 26 Jul 2021 06:50:47 +0000 (14:50 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 26 Jul 2021 12:12:17 +0000 (20:12 +0800)
commitb6f29f4c1b9fac9e46e6be049642d83f6f4c5f9a
tree400edf05802323f2f55d8c87458d5f7c7df0e49f
parent58c4ece8f35b090c7957d52bd7c84f6783d86f90
common/strtol: expose strict_si_cast(std::string_view, ..)

this variant is better than strict_si_cast(const char*), because:

* we can just pass std::string to it, as std::string_view can be
  constructed from a std::string implicitly
* strict_si_cast(std::string_view, ..) is the underlying
  implementation of strict_si_cast(const char*,..), so less
  indirection helps with the readability.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/options/rbd.yaml.in
src/common/strtol.cc
src/common/strtol.h