![]() |
Cockatrice 2026-09-01-Development-3.1.0-beta.10
A virtual tabletop for multiplayer card games
|
#include <QtGlobal>#include <cstdint>Go to the source code of this file.
Functions | |
| int | addClamped (int value, int delta, int minValue, int maxValue) |
| Overflow-safe clamped addition: returns value + delta bounded to [minValue, maxValue]. | |
|
inline |
Overflow-safe clamped addition: returns value + delta bounded to [minValue, maxValue].
Uses a 64-bit intermediate so the addition cannot overflow int. Shared by the bounded counter arithmetic in both the client and the server.