Merge pull request #52719 from cbodley/wip-rgw-get_ws_listing_op

rgw/swift: remove redundant moves of object name

Reviewed-by:  Jiffin Tony Thottan <jthottan@redhat.com>
This commit is contained in:
Casey Bodley 2023-08-02 18:43:32 -04:00 committed by GitHub
commit 8dd646d9e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1982,7 +1982,7 @@ void RGWFormPost::init(rgw::sal::Driver* const driver,
RGWHandler* const dialect_handler)
{
if (!rgw::sal::Object::empty(s->object)) {
prefix = std::move(s->object->get_name());
prefix = s->object->get_name();
s->object->set_key(rgw_obj_key());
}
@ -2555,7 +2555,7 @@ RGWOp* RGWSwiftWebsiteHandler::get_ws_listing_op()
}
};
std::string prefix = std::move(s->object->get_name());
std::string prefix = s->object->get_name();
s->object->set_key(rgw_obj_key());
return new RGWWebsiteListing(std::move(prefix));