Commit 31dc7234 authored by Michał Karzyński's avatar Michał Karzyński Committed by Scott Cyphers

[ONNX] Remove return-std-move-in-c++11 warning (#2937)

This PR removes compiler warnings like this one:

```
src/ngraph/frontend/onnx_import/utils/reduction.hpp:73:28: warning: prior to the resolution
  of a defect report against ISO C++11, local variable 'op_node' would have been copied
  despite being returned by name, due to its not matching the function return type
  ('shared_ptr<ngraph::Node>' vs 'shared_ptr<ngraph::op::ArgMin>') [-Wreturn-std-move-in-c++11]
                  return op_node;
                         ^~~~~~~
```
parent c11c7068
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <cstdint> // std::int64_t #include <cstdint> // std::int64_t
#include <memory> // std::make_shared #include <memory> // std::make_shared
#include <utility> // std::move
#include "core/node.hpp" #include "core/node.hpp"
#include "ngraph/axis_set.hpp" #include "ngraph/axis_set.hpp"
...@@ -69,7 +70,7 @@ namespace ngraph ...@@ -69,7 +70,7 @@ namespace ngraph
if (keepdims == 0) if (keepdims == 0)
{ {
return op_node; return std::move(op_node);
} }
// WORKAROUND FOR PROBLEMS WITH RESHAPE ON i64 @TODO: remove // WORKAROUND FOR PROBLEMS WITH RESHAPE ON i64 @TODO: remove
...@@ -86,7 +87,7 @@ namespace ngraph ...@@ -86,7 +87,7 @@ namespace ngraph
auto reconvert_node = auto reconvert_node =
std::make_shared<ngraph::op::Convert>(reshape_node, element::i64); std::make_shared<ngraph::op::Convert>(reshape_node, element::i64);
return reconvert_node; return std::move(reconvert_node);
} }
} // namespace reduction } // namespace reduction
......
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