diff --git a/src/setting.hh b/src/setting.hh index a0d527e7..b7fd4365 100644 --- a/src/setting.hh +++ b/src/setting.hh @@ -308,7 +308,11 @@ namespace conky { template bool between(Signed1 value, Unsigned2 min, typename std::enable_if::value, Unsigned2>::type max) - { return value >= 0 && value >= min && value <= max; } + { + return value >= 0 + && static_cast::type>(value) >= min + && static_cast::type>(value) <= max; + } // Just like simple_config_setting, except that in only accepts value in the [min, max] range template>