From dc4f6871c33cc052f13f3e3d4692d046f8fe2afe Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 9 Jan 2012 21:46:32 +0100 Subject: [PATCH] Make argument types of min and max more flexible --- base/include/util/misc_math.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/base/include/util/misc_math.h b/base/include/util/misc_math.h index 4181964de..6efc32e29 100644 --- a/base/include/util/misc_math.h +++ b/base/include/util/misc_math.h @@ -16,11 +16,11 @@ namespace Genode { - template - T max(T v1, T v2) { return v1 > v2 ? v1 : v2; } + template + T1 max(T1 v1, T2 v2) { return v1 > v2 ? v1 : v2; } - template - T min(T v1, T v2) { return v1 < v2 ? v1 : v2; } + template + T1 min(T1 v1, T2 v2) { return v1 < v2 ? v1 : v2; } template T abs(T value) { return value >= 0 ? value : -value; }