Skip to content

Commit

Permalink
Fix COPY_INSTEAD_OF_MOVE coverity issue
Browse files Browse the repository at this point in the history
CIDs: 1539732, 1539393, 1539432,
1539689, 1539932, 1539238, 1539930,
1539256, 1539282, 1519009
  • Loading branch information
vurusovs committed Apr 25, 2024
1 parent 98eee8c commit 17296de
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/core/reference/src/op/interpolate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ InterpolateEvalHelper::InfoForGenericLinearONNXMode InterpolateEvalHelper::get_i
result.batch_size = batch_size;
result.num_channels = num_channels;
result.spatial_rank = static_cast<int64_t>(spatial_rank);
result.input_index_multipliers = input_index_multipliers;
result.output_index_multipliers = output_index_multipliers;
result.input_spatial_shape = input_spatial_shape;
result.output_spatial_shape = output_spatial_shape;
result.input_index_multipliers = std::move(input_index_multipliers);
result.output_index_multipliers = std::move(output_index_multipliers);
result.input_spatial_shape = std::move(input_spatial_shape);
result.output_spatial_shape = std::move(output_spatial_shape);

return result;
}
Expand Down Expand Up @@ -134,10 +134,10 @@ InterpolateEvalHelper::InfoForLinearMode InterpolateEvalHelper::get_info_for_lin
InfoForLinearMode result;

result.antialias = antialias;
result.a = a;
result.r = r;
result.a = std::move(a);
result.r = std::move(r);
result.prod_a = prod_a;
result.shape_for_indices = shape_for_indices;
result.shape_for_indices = std::move(shape_for_indices);

return result;
}
Expand All @@ -163,8 +163,8 @@ InterpolateEvalHelper::ICoords InterpolateEvalHelper::get_icoords(const Coordina
icoords_r[axis] = static_cast<int64_t>(std::round(in_coord));
}

result.icoords = icoords;
result.icoords_r = icoords_r;
result.icoords = std::move(icoords);
result.icoords_r = std::move(icoords_r);

return result;
}
Expand Down Expand Up @@ -218,7 +218,7 @@ InterpolateEvalHelper::LinearModeInnerIterationResult InterpolateEvalHelper::inn
Coordinate inner_coord{unsigned_inner_coords_vector};

result.w = w;
result.inner_coord = inner_coord;
result.inner_coord = std::move(inner_coord);

return result;
}
Expand Down

0 comments on commit 17296de

Please sign in to comment.