From 035bf3a6579081a9ea757ec3285d048bf943885b Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 10 Mar 2023 13:50:46 +0100 Subject: [PATCH] resolve Wold-style-cast warnings --- TP2/src/mybt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TP2/src/mybt.cpp b/TP2/src/mybt.cpp index bfa8741..b89305f 100644 --- a/TP2/src/mybt.cpp +++ b/TP2/src/mybt.cpp @@ -1,6 +1,6 @@ #include "../includes/mybt.h" -char *cboard = (char *)"o@."; +char *cboard = const_cast("o@."); void bt_t::init(int _nbl, int _nbc) { if (_nbl > MAX_LINES || _nbc > MAX_COLS) { @@ -190,7 +190,7 @@ bool bt_t::black_can_move_left(int _line, int _col) { bt_move_t bt_t::get_rand_move() { update_moves(); - int r = ((int)rand()) % nb_moves; + int r = (static_cast(rand())) % nb_moves; return moves[r]; }