mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
Change the modified parameter in the Clamp function to be a pointer.
Makes it easier to identify the one being modified.
This commit is contained in:
@ -14,12 +14,12 @@
|
||||
namespace MathUtil
|
||||
{
|
||||
template<class T>
|
||||
inline void Clamp(T& val, const T& min, const T& max)
|
||||
inline void Clamp(T* val, const T& min, const T& max)
|
||||
{
|
||||
if (val < min)
|
||||
val = min;
|
||||
else if (val > max)
|
||||
val = max;
|
||||
if (*val < min)
|
||||
*val = min;
|
||||
else if (*val > max)
|
||||
*val = max;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user