orc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wgtmac <...@git.apache.org>
Subject [GitHub] orc pull request #277: ORC-372: Enable valgrind for C++ travis-ci tests
Date Mon, 04 Jun 2018 23:42:04 GMT
Github user wgtmac commented on a diff in the pull request:

    https://github.com/apache/orc/pull/277#discussion_r192909966
  
    --- Diff: c++/src/TypeImpl.cc ---
    @@ -498,54 +506,54 @@ namespace orc {
       }
     
       ORC_UNIQUE_PTR<Type> Type::buildTypeFromString(const std::string& input)
{
    -    std::vector<std::pair<std::string, Type*> > res =
    +    std::vector<std::pair<std::string, ORC_UNIQUE_PTR<Type> > > res
=
           TypeImpl::parseType(input, 0, input.size());
         if (res.size() != 1) {
           throw std::logic_error("Invalid type string.");
         }
    -    return ORC_UNIQUE_PTR<Type>(res[0].second);
    +    return std::move(res[0].second);
       }
     
       Type* TypeImpl::parseArrayType(const std::string &input,
    --- End diff --
    
    is it better to change return type to unique_ptr as well to be consistent? same for below.


---

Mime
View raw message