ex00 min and max recieve const values

This commit is contained in:
aortigos
2026-03-23 14:51:35 +01:00
parent d05d0063a7
commit 888c78c732

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */ /* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2026/03/23 14:10:38 by aortigos #+# #+# */ /* Created: 2026/03/23 14:10:38 by aortigos #+# #+# */
/* Updated: 2026/03/23 14:13:22 by aortigos ### ########.fr */ /* Updated: 2026/03/23 14:48:46 by aortigos ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@@ -26,7 +26,7 @@ void swap(T &x, T &y)
} }
template <typename T> template <typename T>
T min(T &x, T &y) T min(T const &x, T const &y)
{ {
if (x < y) if (x < y)
return (x); return (x);
@@ -34,7 +34,7 @@ T min(T &x, T &y)
} }
template <typename T> template <typename T>
T max(T &x, T &y) T max(T const &x, T const &y)
{ {
if (x > y) if (x > y)
return (x); return (x);