From: Casey Bodley Date: Fri, 12 Apr 2019 19:56:01 +0000 (-0400) Subject: rgw: use std::optional in bilog trim X-Git-Tag: v15.1.0~2906^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ded548953cfcf6a9ee5a078837de59e07edf469a;p=ceph.git rgw: use std::optional in bilog trim clean up an ugly workaround for a bug in boost::optional Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_sync_log_trim.cc b/src/rgw/rgw_sync_log_trim.cc index cae02600477f..f35e2caf762c 100644 --- a/src/rgw/rgw_sync_log_trim.cc +++ b/src/rgw/rgw_sync_log_trim.cc @@ -354,9 +354,7 @@ int take_min_status(CephContext *cct, Iter first, Iter last, std::vector *status) { status->clear(); - // The initialisation below is required to silence a false positive - // -Wmaybe-uninitialized warning - boost::optional num_shards = boost::make_optional(false, uint64_t()); + std::optional num_shards; for (auto peer = first; peer != last; ++peer) { const size_t peer_shards = peer->size(); if (!num_shards) {