* Get a badge if it exists. * @param index Index of badge. * @returns Badge with specified index, or nullptr if it does not exist. */
| 111 | * @returns Badge with specified index, or nullptr if it does not exist. |
| 112 | */ |
| 113 | Badge *GetBadge(BadgeID index) |
| 114 | { |
| 115 | if (index.base() >= std::size(_badges.specs)) return nullptr; |
| 116 | return &_badges.specs[index.base()]; |
| 117 | } |
| 118 | |
| 119 | /** |
| 120 | * Get a badge by label if it exists. |
no test coverage detected