Skip to content

Commit c0ea38c

Browse files
committed
fix some modernize-pass-by-value issues
1 parent dc1aa24 commit c0ea38c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

multi_physics/QED/include/picsar_qed/containers/picsar_tables.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <algorithm>
2020
#include <cmath>
2121
#include <stdexcept>
22+
#include <utility>
2223

2324
namespace picsar::multi_physics::containers
2425
{
@@ -111,7 +112,7 @@ namespace details{
111112
m_x_min{x_min}, m_x_max{x_max}, m_x_size{x_max - x_min},
112113
m_how_many_x{static_cast<int>(values.size())},
113114
m_dx{m_x_size/(m_how_many_x-1)},
114-
m_values{values}
115+
m_values{std::move(values)}
115116
{
116117
//VectorType may need a call to a user-defined method for CPU-GPU synchronization
117118
details::aux_sync_vec(m_values);
@@ -439,7 +440,7 @@ namespace details{
439440
m_how_many_x{how_many_x}, m_how_many_y{how_many_y},
440441
m_dx{m_x_size/(m_how_many_x-1)},
441442
m_dy{m_y_size/(m_how_many_y-1)},
442-
m_values{values}
443+
m_values{std::move(values)}
443444
{
444445
//VectorType may need a call to a user-defined method for CPU-GPU synchronization
445446
details::aux_sync_vec(m_values);
@@ -986,7 +987,7 @@ namespace details{
986987
IXMapFunctor ix_map_functor,
987988
IYMapFunctor iy_map_functor):
988989
m_how_many_x{how_many_x}, m_how_many_y{how_many_y},
989-
m_values{values},
990+
m_values{std::move(values)},
990991
m_x_map_functor{x_map_functor}, m_y_map_functor{y_map_functor},
991992
m_ix_map_functor{ix_map_functor}, m_iy_map_functor{iy_map_functor}
992993
{}

0 commit comments

Comments
 (0)