Skip to content

Commit

Permalink
Small fix to use named constants instead of magic numbers
Browse files Browse the repository at this point in the history
This is an old change that was sitting around for who-knows-how-long. Hopefully it's not nonsense.
  • Loading branch information
heyx3 committed Sep 24, 2023
1 parent 7d82170 commit b12c9f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WFC++/Tiled3D/Grid.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace WFC
//The state of an output cell.
struct WFC_API CellState
{
TileIdx ChosenTile = -1;
TileIdx ChosenTile = TileIdx_INVALID;
Transform3D ChosenPermutation = Transform3D{};

//Some tiles are given by the user, and this algorithm has to work around them.
Expand All @@ -38,7 +38,7 @@ namespace WFC
uint16_t NPossibilities = 0;


bool IsSet() const { return ChosenTile != (TileIdx)(-1); }
bool IsSet() const { return ChosenTile != TileIdx_INVALID; }
};

//A record of what happened during some action.
Expand Down

0 comments on commit b12c9f2

Please sign in to comment.