[Object] Fix pessimizing move.

Returning the Error by value triggers copy elision, the move is more
expensive. Clang rightfully warns about it.

llvm-svn: 304232
This commit is contained in:
Benjamin Kramer 2017-05-30 19:36:58 +00:00
parent 87aefe9042
commit 14ea122e6e
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ namespace object {
#define RETURN_IF_ERROR(X) \
if (auto EC = X) \
return std::move(EC);
return EC;
const uint32_t MIN_HEADER_SIZE = 7 * sizeof(uint32_t) + 2 * sizeof(uint16_t);