mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-04 12:33:55 -07:00
- Add addClamped() in new header clamped_arithmetic.h; uses a 64-bit intermediate so the addition cannot overflow int. - Use it in Server_Card::incrementCounter() (clamps [0, MAX_COUNTERS_ON_CARD]) and Server_Counter::incrementCount() (clamps [INT_MIN, INT_MAX]), removing the duplicated overflow-safe logic and its keep-in-sync TODO. - Inline incrementCount() into server_counter.h; server_counter.cpp now holds only the constructor and getInfo(). - Clarify the card-counter bounds comment in trice_limits.h. |
||
|---|---|---|
| .. | ||
| card_ref.h | ||
| clamped_arithmetic.h | ||
| color.h | ||
| days_years_between.h | ||
| expression.cpp | ||
| expression.h | ||
| levenshtein.cpp | ||
| levenshtein.h | ||
| macros.h | ||
| passwordhasher.cpp | ||
| passwordhasher.h | ||
| peglib.h | ||
| qt_utils.h | ||
| trice_limits.h | ||
| zone_names.h | ||