Skip to content

Commit

Permalink
Fix wasm calls
Browse files Browse the repository at this point in the history
  • Loading branch information
dmeybohm committed Apr 25, 2024
1 parent 75c5f7c commit 7f5c2aa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions ui/wasm/web_game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ namespace wisdom
{
WebColoredPiece new_piece
= WebColoredPiece { id, toInt (piece.color()), toInt (piece.type()),
gsl::narrow<int> (Row (coord)),
gsl::narrow<int> (Column (coord)) };
gsl::narrow<int> (coord.row(),
gsl::narrow<int> (coord.column()) };
my_pieces.addPiece (new_piece);
id++;
}
Expand Down Expand Up @@ -176,8 +176,8 @@ namespace wisdom
id,
toInt (piece.color()),
toInt (piece.type()),
gsl::narrow<int8_t> (Row (coord)),
gsl::narrow<int8_t> (Column (coord)),
gsl::narrow<int8_t> (coord.row()),
gsl::narrow<int8_t> (coord.column()),
};
my_pieces.addPiece (new_piece);
}
Expand Down Expand Up @@ -218,8 +218,8 @@ namespace wisdom
old_piece.id,
old_piece.color,
mapPiece (new_piece.type()),
Row<int8_t> (coord),
Column<int8_t> (coord),
coord.row<int8_t>(),
coord.column<int8_t>(),
});
}
}
Expand Down
4 changes: 2 additions & 2 deletions ui/wasm/web_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ namespace wisdom
static auto fromTextCoord (char* coord_text) -> WebCoord*
{
auto coord = coordParse (coord_text);
return new WebCoord { gsl::narrow<int> (Row (coord)),
gsl::narrow<int> (Column (coord)) };
return new WebCoord { gsl::narrow<int> (coord.row()),
gsl::narrow<int> (coord.column()) };
}
};

Expand Down

0 comments on commit 7f5c2aa

Please sign in to comment.