From ded548953cfcf6a9ee5a078837de59e07edf469a Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Fri, 12 Apr 2019 15:56:01 -0400 Subject: [PATCH] rgw: use std::optional in bilog trim clean up an ugly workaround for a bug in boost::optional Signed-off-by: Casey Bodley --- src/rgw/rgw_sync_log_trim.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/rgw/rgw_sync_log_trim.cc b/src/rgw/rgw_sync_log_trim.cc index cae02600477..f35e2caf762 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) { -- 2.39.5