From: David Blaikie Date: Mon, 21 Jul 2014 16:23:21 +0000 (+0000) Subject: Remove unnecessary use of unique_ptr::release() used to construct another unique_ptr. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d8fa9295c853695900eaede718ce75125c9baf68;p=oota-llvm.git Remove unnecessary use of unique_ptr::release() used to construct another unique_ptr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213556 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Object/Archive.cpp b/lib/Object/Archive.cpp index 63877913937..3c683408969 100644 --- a/lib/Object/Archive.cpp +++ b/lib/Object/Archive.cpp @@ -181,8 +181,7 @@ Archive::Child::getAsBinary(LLVMContext *Context) const { if (std::error_code EC = BuffOrErr.getError()) return EC; - std::unique_ptr Buff(BuffOrErr.get().release()); - return createBinary(Buff, Context); + return createBinary(*BuffOrErr, Context); } ErrorOr Archive::create(std::unique_ptr Source) {