Merge pull request #14946 from andrey-golubev:obj_not_ref
authorAndrey Golubev <andrey.golubev@intel.com>
Tue, 2 Jul 2019 16:03:45 +0000 (19:03 +0300)
committerAlexander Alekhin <alexander.a.alekhin@gmail.com>
Tue, 2 Jul 2019 16:03:45 +0000 (19:03 +0300)
G-API: Use object instead of reference in extended lifetime case (#14946)

* Use object instead of reference

* Make the object const

modules/gapi/src/compiler/passes/meta.cpp

index 528d84c..1577a86 100644 (file)
@@ -75,7 +75,7 @@ void cv::gimpl::passes::inferMeta(ade::passes::PassContext &ctx, bool meta_is_in
             // Now ask kernel for it's output meta.
             // Resulting out_args may have a larger size than op.outs, since some
             // outputs could stay unused (unconnected)
-            const auto& out_metas = op.k.outMeta(input_meta_args, op.args);
+            const auto out_metas = op.k.outMeta(input_meta_args, op.args);
 
             // Walk through operation's outputs, update meta of output objects
             // appropriately