1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-28 13:00:45 +00:00

Use min() and max() instead of infinity() for default limits

because integral types do not have infinite values
This commit is contained in:
Pavel Labath 2010-02-28 12:13:37 +01:00
parent a4a08c82b5
commit 5c3d06346a

View File

@ -186,8 +186,8 @@ namespace conky {
T min;
T max;
public:
range_checking_accessors(T min_ = -std::numeric_limits<T>::infinity(),
T max_ = std::numeric_limits<T>::infinity(),
range_checking_accessors(T min_ = std::numeric_limits<T>::min(),
T max_ = std::numeric_limits<T>::max(),
T default_value_ = T(), bool modifiable_ = false)
: Base(default_value_, modifiable_), min(min_), max(max_)
{ assert(min_ <= default_value_ && default_value_ <= max_); }