From 53f86b3aab439311bffab8314b2e261a8218e946 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Thu, 15 Feb 2024 17:29:53 +0000 Subject: [PATCH] Allow using strong type with SetDParamMaxValue --- src/strings_func.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/strings_func.h b/src/strings_func.h index 4bcd224df3..43828f098b 100644 --- a/src/strings_func.h +++ b/src/strings_func.h @@ -99,6 +99,12 @@ inline void SetDParam(size_t n, T &&v) { void SetDParamMaxValue(size_t n, uint64_t max_value, uint min_count = 0, FontSize size = FS_NORMAL); void SetDParamMaxDigits(size_t n, uint count, FontSize size = FS_NORMAL); +template ::value, int> = 0> +void SetDParamMaxValue(size_t n, T max_value, uint min_count = 0, FontSize size = FS_NORMAL) +{ + SetDParamMaxValue(n, max_value.base(), min_count, size); +} + void SetDParamStr(size_t n, const char *str); void SetDParamStr(size_t n, std::string str);