Skip to content

Commit

Permalink
fix: CodeQL warnings in `machine_learning/a_st...
Browse files Browse the repository at this point in the history
...`ar_search.cpp`
  • Loading branch information
Panquesito7 committed Apr 8, 2021
1 parent 0a596dd commit 8adaec9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions machine_learning/a_star_search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,15 +305,15 @@ class AyStarSearch {
* @brief constructor having Puzzle as parameter
* @param A a puzzle object
*/
explicit Info(Puzzle A) : state(std::move(A)) {}
explicit Info(const Puzzle &A) : state(std::move(A)) {}

/**
* @brief constructor having three parameters
* @param A a puzzle object
* @param h_value heuristic value of this puzzle object
* @param depth the depth at which this node was found during traversal
*/
Info(Puzzle A, size_t h_value, size_t d)
Info(const Puzzle &A, size_t h_value, size_t d)
: state(std::move(A)), heuristic_value(h_value), depth(d) {}

/**
Expand Down

0 comments on commit 8adaec9

Please sign in to comment.