Set containing 'items' items of 'tile and Tdir' No tree structure is used because it would cause slowdowns in most usual cases.
More...
|
| | SmallSet (std::string_view name) |
| | Constructor - just set default values and 'name'.
|
| |
| void | Reset () |
| | Reset variables to default values.
|
| |
| bool | Overflowed () |
| | Returns value of 'overflowed'.
|
| |
| bool | IsEmpty () |
| | Checks for empty set.
|
| |
| bool | IsFull () |
| | Checks for full set.
|
| |
| uint | Items () |
| | Reads the number of items.
|
| |
| bool | Remove (TileIndex tile, Tdir dir) |
| | Tries to remove first instance of given tile and dir.
|
| |
| bool | IsIn (TileIndex tile, Tdir dir) |
| | Tries to find given tile and dir in the set.
|
| |
| bool | Add (TileIndex tile, Tdir dir) |
| | Adds tile & dir into the set, checks for full set Sets the 'overflowed' flag if the set was full.
|
| |
| bool | Get (TileIndex *tile, Tdir *dir) |
| | Reads the last added element into the set.
|
| |
template<typename Tdir, uint items>
struct SmallSet< Tdir, items >
Set containing 'items' items of 'tile and Tdir' No tree structure is used because it would cause slowdowns in most usual cases.
Definition at line 55 of file signal.cpp.
template<typename Tdir , uint items>
Adds tile & dir into the set, checks for full set Sets the 'overflowed' flag if the set was full.
- Parameters
-
| tile | tile |
| dir | and dir to add |
- Returns
- true iff the item could be added (set wasn't full)
Definition at line 155 of file signal.cpp.
References Debug, and SmallSet< Tdir, items >::IsFull().