]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw,mon,common/strtol: use strict_iec_cast(std::string_view, ..)
authorKefu Chai <kchai@redhat.com>
Mon, 26 Jul 2021 06:41:24 +0000 (14:41 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 26 Jul 2021 12:12:17 +0000 (20:12 +0800)
commit58c4ece8f35b090c7957d52bd7c84f6783d86f90
treec633d40d744577c655b69838e85c12c8db1a4924
parentda35cbe6bc54102267deb773a5838a5297272330
rgw,mon,common/strtol: use strict_iec_cast(std::string_view, ..)

this variant is better than strict_iec_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_iec_cast(std::string_view, ..) is the underlying
  implementation of strict_iec_cast(const char*,..), so less
  indirection helps with the readability.
* rgw,mon: use strict_iec_cast(std::string_view, ..) instead.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/strtol.cc
src/common/strtol.h
src/mon/OSDMonitor.cc
src/rgw/rgw_admin.cc