Skip to content

Commit

Permalink
fixed possibly dangling reference to a temporary for gcc.
Browse files Browse the repository at this point in the history
  • Loading branch information
KateBlueSky committed Mar 3, 2025
1 parent 8a12ddd commit 2238fad
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions cpp/oneapi/dal/algo/jaccard/detail/vertex_similarity_ops.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,12 @@ struct vertex_similarity_ops_dispatcher {
const Descriptor &descriptor,
vertex_similarity_input<Graph, task_t> &input) const {

Check notice on line 37 in cpp/oneapi/dal/algo/jaccard/detail/vertex_similarity_ops.hpp

View check run for this annotation

codefactor.io / CodeFactor

cpp/oneapi/dal/algo/jaccard/detail/vertex_similarity_ops.hpp#L37

Redundant blank line at the start of a code block should be deleted. (whitespace/blank_line)
const auto &t = dal::preview::detail::csr_topology_builder<Graph>()(input.get_graph());
auto topology_builder = dal::preview::detail::csr_topology_builder<Graph>();
const auto &t = topology_builder(input.get_graph());

// Assume get_backend returns a std::shared_ptr or std::unique_ptr
static auto impl = get_backend<Policy, Descriptor>(descriptor, t);

// Ensure impl is valid
if (!impl) {
throw std::runtime_error("Failed to get backend implementation");
}

return (*impl)(policy, descriptor, t, input.get_caching_builder());
}
};
Expand Down

0 comments on commit 2238fad

Please sign in to comment.