From 8adaec948cd9ff657d8a96333e67d52e31546c68 Mon Sep 17 00:00:00 2001 From: David Leal Date: Thu, 8 Apr 2021 18:39:28 -0500 Subject: [PATCH] fix: CodeQL warnings in `machine_learning/a_st... ...`ar_search.cpp` --- machine_learning/a_star_search.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/machine_learning/a_star_search.cpp b/machine_learning/a_star_search.cpp index cf3c7ab42..b9769a308 100644 --- a/machine_learning/a_star_search.cpp +++ b/machine_learning/a_star_search.cpp @@ -305,7 +305,7 @@ 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 @@ -313,7 +313,7 @@ class AyStarSearch { * @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) {} /**