[gnome-sudoku] Avoid casting to int[] in count_solutions_limited()
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sudoku] Avoid casting to int[] in count_solutions_limited()
- Date: Mon, 25 Jul 2022 13:05:21 +0000 (UTC)
commit a620876f5d698399148661d1e2d5eb5b0cbde77e
Author: Steven Elliott <selliott512 gmail com>
Date: Sun Jul 24 14:54:51 2022 -0400
Avoid casting to int[] in count_solutions_limited()
lib/sudoku-board.vala | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/lib/sudoku-board.vala b/lib/sudoku-board.vala
index 661bfa3..bed0be7 100644
--- a/lib/sudoku-board.vala
+++ b/lib/sudoku-board.vala
@@ -393,7 +393,9 @@ public class SudokuBoard : Object
public int count_solutions_limited ()
{
- return QQwing.count_solutions_limited ((int[]) cells);
+ int[] cells_1d = convert_2d_to_1d(cells);
+
+ return QQwing.count_solutions_limited (cells_1d);
}
public Set<Coord?> get_occurances(Gee.List<Coord?> coords, int val)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]