Commit c12e5941 authored by Laurent Stacul's avatar Laurent Stacul Committed by Facebook Github Bot

Fix warning 'redundant-move' (#1107)

Summary:
Hello Facebook,

This small PR to fix the redundant std::move usage detected by gcc (GCC) 9.0.1 20190225 (experimental)

```
/folly/BUILD/folly-2019.04.01.00/folly/executors/task_queue/PriorityLifoSemMPMCQueue.h:92:30: error: redundant move in return statement [-Werror=redundant-move]
   92 |         return std::move(item);
      |                              ^
```

Stac
Pull Request resolved: https://github.com/facebook/folly/pull/1107

Reviewed By: Orvid

Differential Revision: D14874144

Pulled By: yfeldblum

fbshipit-source-id: c65a422c500606103192b3d9377a52b4abf5a653
parent 5bd275f0
......@@ -57,7 +57,7 @@ class LifoSemMPMCQueue : public BlockingQueue<T> {
return folly::none;
}
}
return std::move(item);
return item;
}
size_t capacity() {
......
......@@ -89,7 +89,7 @@ class PriorityLifoSemMPMCQueue : public BlockingQueue<T> {
T item;
while (true) {
if (nonBlockingTake(item)) {
return std::move(item);
return item;
}
if (!sem_.try_wait_for(time)) {
return folly::none;
......
......@@ -1031,7 +1031,7 @@ std::unique_ptr<Validator> makeValidator(const dynamic& schema) {
SchemaValidatorContext context(schema);
context.refs["#"] = v.get();
v->loadSchema(context, schema);
return std::move(v);
return v;
}
std::shared_ptr<Validator> makeSchemaValidator() {
......
......@@ -574,7 +574,7 @@ dynamic logConfigToDynamic(const LogHandlerConfig& config) {
if (config.type.hasValue()) {
result("type", config.type.value());
}
return std::move(result);
return result;
}
dynamic logConfigToDynamic(const LogCategoryConfig& config) {
......@@ -587,7 +587,7 @@ dynamic logConfigToDynamic(const LogCategoryConfig& config) {
}
value("handlers", std::move(handlers));
}
return std::move(value);
return value;
}
} // namespace folly
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment