ex00: vrai fix

This commit is contained in:
Camille Chauvet 2023-10-05 11:02:49 +00:00
parent 65428a0883
commit 5dfbb423d3

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
template <typename T> template <typename T>
void swap(T a, T b) void swap(T& a, T& b)
{ {
T tmp = a; T tmp = a;
a = b; a = b;
@ -9,13 +9,13 @@ void swap(T a, T b)
} }
template <typename T> template <typename T>
T min(T a, T b) T min(const T& a, const T& b)
{ {
return a > b ? b : a; return a > b ? b : a;
} }
template <typename T> template <typename T>
T max(T a, T b) T max(const T& a, const T& b)
{ {
return a > b ? a : b; return a > b ? a : b;
} }