From 46c9d6b73f3ce5877dbb6527ebc9de3ab42289ed Mon Sep 17 00:00:00 2001 From: Kellen Sunderland Date: Sat, 25 Aug 2018 18:06:22 +0200 Subject: [PATCH] Add unnecessary copy check to clang-tidy --- .clang-tidy | 2 +- src/operator/contrib/roi_align.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 993656e12766..c84ba323b604 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -54,7 +54,7 @@ Checks: > # In order to trigger an error, you must have a rule defined both in checks and in this section. WarningsAsErrors: > - cppcoreguidelines-no-malloc + cppcoreguidelines-no-malloc, performance-unnecessary-copy-initialization # Todo: define a better regex match that includes most project headers, but excludes third party # code. diff --git a/src/operator/contrib/roi_align.cc b/src/operator/contrib/roi_align.cc index 963647cc6ad1..7e548481980b 100644 --- a/src/operator/contrib/roi_align.cc +++ b/src/operator/contrib/roi_align.cc @@ -422,7 +422,7 @@ void ROIAlignForwardCompute(const nnvm::NodeAttrs& attrs, CHECK_EQ(out_data.size(), expected_out); CHECK_EQ(out_data[roialign::kOut].shape_[0], in_data[roialign::kBox].shape_[0]); - const ROIAlignParam param& = nnvm::get(attrs.parsed); + const ROIAlignParam& param = nnvm::get(attrs.parsed); const int count = out_data[roialign::kOut].Size(); // const int num_rois = in_data[roialign::kBox].size(0);