resolve Wold-style-cast warnings

This commit is contained in:
Mylloon 2023-03-10 13:50:46 +01:00
parent 20499fbb48
commit 035bf3a657
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -1,6 +1,6 @@
#include "../includes/mybt.h"
char *cboard = (char *)"o@.";
char *cboard = const_cast<char *>("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<int>(rand())) % nb_moves;
return moves[r];
}