Browse Source

Fix new gcc-9 warning -Wpessimizing-move

warning: moving a local object in a return statement prevents copy
elision [-Wpessimizing-move]

Reported-By: gcc-9
Gbp-Dch: Ignore
tags/devuan/2.0.1+devuan1
David Kalnischkies 1 year ago
parent
commit
a967ba0541
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      methods/connect.cc

+ 1
- 1
methods/connect.cc View File

@@ -262,7 +262,7 @@ static std::vector<struct addrinfo *> OrderAddresses(struct addrinfo *CurHost)
allAddrs.push_back(*otherIter++);
}

return std::move(allAddrs);
return allAddrs;
}
/*}}}*/
// Check for errors and report them /*{{{*/


Loading…
Cancel
Save