Match daNpc_Bs1_c::CreateInit and cLib_minMaxLimit inline

This commit is contained in:
LagoLunatic
2024-07-19 13:17:43 -04:00
parent 66dfae2571
commit 287bdab653
4 changed files with 6 additions and 21 deletions
+1 -16
View File
@@ -58,22 +58,7 @@ inline void cLib_setBit(T& value, T bit) {
template <typename T>
inline T cLib_minMaxLimit(T val, T min, T max) {
T ret;
T var_r30;
if (val < min) {
ret = min;
} else {
if (val > max) {
var_r30 = max;
} else {
var_r30 = val;
}
ret = var_r30;
}
return (T)ret;
return (T)((T)val < (T)min ? (T)min : ((T)val > (T)max ? (T)max : (T)val));
}
template <typename T>