Skip to content

Commit

Permalink
Some more warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatyas committed Nov 24, 2023
1 parent 2422061 commit f6970fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/common/TilesetManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,22 @@ CTileset::~CTileset()
TileType CTileset::GetTileType(short iTileCol, short iTileRow)
{
assert(iTileCol >= 0 && iTileRow >= 0);
assert(iTileCol + iTileRow * iWidth < tiletypes.size());
assert(static_cast<size_t>(iTileCol + iTileRow * iWidth) < tiletypes.size());
return tiletypes[iTileCol + iTileRow * iWidth];
}

void CTileset::SetTileType(short iTileCol, short iTileRow, TileType type)
{
assert(iTileCol >= 0 && iTileRow >= 0);
assert(iTileCol + iTileRow * iWidth < tiletypes.size());
assert(static_cast<size_t>(iTileCol + iTileRow * iWidth) < tiletypes.size());
tiletypes[iTileCol + iTileRow * iWidth] = type;
}

TileType CTileset::IncrementTileType(short iTileCol, short iTileRow)
{
assert(iTileCol >= 0 && iTileRow >= 0);
short iTile = iTileCol + iTileRow * iWidth;
assert(iTile < tiletypes.size());
assert(static_cast<size_t>(iTile) < tiletypes.size());
tiletypes[iTile] = NextTileType(tiletypes[iTile]);

return tiletypes[iTile];
Expand All @@ -116,7 +116,7 @@ TileType CTileset::DecrementTileType(short iTileCol, short iTileRow)
{
assert(iTileCol >= 0 && iTileRow >= 0);
short iTile = iTileCol + iTileRow * iWidth;
assert(iTile < tiletypes.size());
assert(static_cast<size_t>(iTile) < tiletypes.size());
tiletypes[iTile] = PrevTileType(tiletypes[iTile]);

return tiletypes[iTile];
Expand Down
1 change: 0 additions & 1 deletion src/smw/menu/network/NetNewRoomMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class UI_NetNewRoomMenu : public UI_Menu
private:
MI_TextField * miNetNewRoomNameField;
MI_TextField * miNetNewRoomPasswordField;
MI_SelectField * miNetNewRoomPrivateToggle;
MI_Button * miNetNewRoomCreateButton;
MI_Button * miNetNewRoomBackButton;

Expand Down

0 comments on commit f6970fb

Please sign in to comment.