Added min() and max() functions.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4173 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2003-07-31 22:47:17 +00:00
parent ec4ef3525f
commit e37159e2db

View File

@ -13,6 +13,28 @@ namespace DiskDevice {
// helper functions
// min
template<typename T>
static inline
const T&
min(const T &a, const T &b)
{
if (a < b)
return a;
return b;
}
// max
template<typename T>
static inline
const T&
max(const T &a, const T &b)
{
if (a < b)
return b;
return a;
}
// set_string
static inline
status_t