Skip to content

Commit

Permalink
【Hackathon 6th Fundable Projects 2 No.5】bugprone-fold-init-type-final (
Browse files Browse the repository at this point in the history
…#64438)

* 5.19

* 5.22

* 5.25
  • Loading branch information
ApricityXX authored May 28, 2024
1 parent 42a2774 commit 04ebdb1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ bugprone-copy-constructor-init,
-bugprone-dangling-handle,
-bugprone-dynamic-static-initializers,
bugprone-exception-escape,
-bugprone-fold-init-type,
bugprone-fold-init-type,
-bugprone-forwarding-reference-overload,
bugprone-inaccurate-erase,
bugprone-incorrect-roundings,
Expand Down
5 changes: 3 additions & 2 deletions paddle/phi/kernels/cpu/graph_khop_sampler_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,9 @@ void GraphKhopSamplerKernel(const Context& dev_ctx,
std::copy(eids_merge.begin(), eids_merge.end(), out_eids_data);
}

int64_t num_sample_edges = std::accumulate(
dst_sample_counts_merge.begin(), dst_sample_counts_merge.end(), 0);
int64_t num_sample_edges = std::accumulate(dst_sample_counts_merge.begin(),
dst_sample_counts_merge.end(),
static_cast<int64_t>(0));
PADDLE_ENFORCE_EQ(
src_merge.size(),
num_sample_edges,
Expand Down

0 comments on commit 04ebdb1

Please sign in to comment.