| 4 | namespace Star { |
| 5 | |
| 6 | void StatSet::addStat(String statName, float baseValue) { |
| 7 | if (!m_baseStats.insert(std::move(statName), baseValue).second) |
| 8 | throw StatusException::format("Added duplicate stat named '{}' in StatSet", statName); |
| 9 | update(0.0f); |
| 10 | } |
| 11 | |
| 12 | void StatSet::removeStat(String const& statName) { |
| 13 | if (!m_baseStats.remove(statName)) |