summaryrefslogtreecommitdiff
path: root/include/SSystem/SComponent
diff options
context:
space:
mode:
Diffstat (limited to 'include/SSystem/SComponent')
-rw-r--r--include/SSystem/SComponent/c_lib.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/include/SSystem/SComponent/c_lib.h b/include/SSystem/SComponent/c_lib.h
index 8f6bb36f..20f531cd 100644
--- a/include/SSystem/SComponent/c_lib.h
+++ b/include/SSystem/SComponent/c_lib.h
@@ -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>