ex00 min and max recieve const values
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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>
|
||||
T min(T &x, T &y)
|
||||
T min(T const &x, T const &y)
|
||||
{
|
||||
if (x < y)
|
||||
return (x);
|
||||
@@ -34,7 +34,7 @@ T min(T &x, T &y)
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T max(T &x, T &y)
|
||||
T max(T const &x, T const &y)
|
||||
{
|
||||
if (x > y)
|
||||
return (x);
|
||||
|
||||
Reference in New Issue
Block a user