Cockatrice/libcockatrice_network/libcockatrice/network/server/remote
DawnFire42 7aed233bd8
Unify counter clamp arithmetic into shared addClamped() helper
- 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.
2026-06-28 16:20:54 -04:00
..
game Unify counter clamp arithmetic into shared addClamped() helper 2026-06-28 16:20:54 -04:00
CMakeLists.txt Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212) 2025-10-09 07:36:12 +02:00
room_message_type.h Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212) 2025-10-09 07:36:12 +02:00
server.cpp [Room][UserList] Introduce style delegate (#6981) 2026-06-26 20:52:24 -04:00
server.h [Room][UserList] Introduce style delegate (#6981) 2026-06-26 20:52:24 -04:00
server_abstractuserinterface.cpp style: Add braces to all control flow statements (#6887) 2026-05-16 19:19:53 +02:00
server_abstractuserinterface.h [Cleanup] Unused #includes (#6367) 2025-11-29 18:53:11 +01:00
server_database_interface.cpp Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212) 2025-10-09 07:36:12 +02:00
server_database_interface.h [Fix-Warnings] Remove more redundant empty declarations. (extra semicolons) (#6374) 2025-11-29 14:19:11 +01:00
server_player_reference.h fix arch compiling (#6895) 2026-05-16 19:39:34 +02:00
server_protocolhandler.cpp style: Add braces to all control flow statements (#6887) 2026-05-16 19:19:53 +02:00
server_protocolhandler.h [Cleanup] Unused #includes (#6367) 2025-11-29 18:53:11 +01:00
server_remoteuserinterface.cpp Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212) 2025-10-09 07:36:12 +02:00
server_remoteuserinterface.h Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212) 2025-10-09 07:36:12 +02:00
server_response_containers.cpp style: Add braces to all control flow statements (#6887) 2026-05-16 19:19:53 +02:00
server_response_containers.h Mark more functions as [[nodiscard]] (#6320) 2025-11-16 01:39:24 +01:00
server_room.cpp style: Add braces to all control flow statements (#6887) 2026-05-16 19:19:53 +02:00
server_room.h [Cleanup] Unused #includes (#6367) 2025-11-29 18:53:11 +01:00
serverinfo_user_container.cpp style: Add braces to all control flow statements (#6887) 2026-05-16 19:19:53 +02:00
serverinfo_user_container.h Mark more functions as [[nodiscard]] (#6320) 2025-11-16 01:39:24 +01:00
user_level.h Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212) 2025-10-09 07:36:12 +02:00