BLI: Inline math::min_max

For some reason this was not inlined. Considering it's a very simple function
and function call overhead could be measurable. In the case of the simple
brush benchmark file from the current sculpting project (#118145), this
improved performance by 6%, from 2.44s to 2.29s.
This commit is contained in:
Hans Goudey
2024-06-05 13:27:44 -04:00
parent 561f26e31a
commit e598d92e3d

View File

@@ -258,7 +258,7 @@ template<typename T, int Size>
}
template<typename T, int Size>
void min_max(const VecBase<T, Size> &vector, VecBase<T, Size> &min, VecBase<T, Size> &max)
inline void min_max(const VecBase<T, Size> &vector, VecBase<T, Size> &min, VecBase<T, Size> &max)
{
min = math::min(vector, min);
max = math::max(vector, max);