summaryrefslogtreecommitdiff
path: root/include/SSystem
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2024-07-19 13:17:43 -0400
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2024-07-19 13:17:43 -0400
commit287bdab653c8ec4e10c31b6b2530dfd5ff7b9639 (patch)
treed4e3870a294512cd0b0cda13fc3e9de776d66c31 /include/SSystem
parent66dfae2571265ed7b72c9a6cb74d804a50695f3e (diff)
Match daNpc_Bs1_c::CreateInit and cLib_minMaxLimit inline
Diffstat (limited to 'include/SSystem')
-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>