resolve Wold-style-cast warnings
This commit is contained in:
parent
20499fbb48
commit
035bf3a657
1 changed files with 2 additions and 2 deletions
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue