ex00: vrai fix
This commit is contained in:
parent
65428a0883
commit
5dfbb423d3
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
template <typename T>
|
||||
void swap(T a, T b)
|
||||
void swap(T& a, T& b)
|
||||
{
|
||||
T tmp = a;
|
||||
a = b;
|
||||
@ -9,13 +9,13 @@ void swap(T a, T b)
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T min(T a, T b)
|
||||
T min(const T& a, const T& b)
|
||||
{
|
||||
return a > b ? b : a;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T max(T a, T b)
|
||||
T max(const T& a, const T& b)
|
||||
{
|
||||
return a > b ? a : b;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user