]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Guess point owner uses std::move to return tuple 7749/head
authorGiovanni Alzetta <giovannialzetta@hotmail.it>
Mon, 25 Feb 2019 11:40:27 +0000 (12:40 +0100)
committerGiovanni Alzetta <giovannialzetta@hotmail.it>
Mon, 25 Feb 2019 11:40:27 +0000 (12:40 +0100)
source/grid/grid_tools.cc
tests/grid/grid_tools_guess_pt_owner_01.cc [moved from tests/grid/grid_tools_guess_pt_owner_1.cc with 100% similarity]
tests/grid/grid_tools_guess_pt_owner_01.output [moved from tests/grid/grid_tools_guess_pt_owner_1.output with 100% similarity]

index 58d12d3a94fca95bb4d214afa9f941cc1a79435a..44d49753d1661040521dd2e23e78e528c7fb3e14 100644 (file)
@@ -2091,16 +2091,9 @@ namespace GridTools
           map_owners_guessed[pt] = owners_found;
       }
 
-    std::tuple<std::vector<std::vector<unsigned int>>,
-               std::map<unsigned int, unsigned int>,
-               std::map<unsigned int, std::vector<unsigned int>>>
-      output_tuple;
-
-    std::get<0>(output_tuple) = point_owners;
-    std::get<1>(output_tuple) = map_owners_found;
-    std::get<2>(output_tuple) = map_owners_guessed;
-
-    return output_tuple;
+    return std::make_tuple(std::move(point_owners),
+                           std::move(map_owners_found),
+                           std::move(map_owners_guessed));
   }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.