summaryrefslogtreecommitdiff
path: root/ace/Min_Max.h
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-11-01 22:17:39 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-11-01 22:17:39 +0000
commit53284e215e3d3351a7d7e9c4b68f14b427fb4377 (patch)
tree97236ece363cff48fd287c780db4290da39b02cb /ace/Min_Max.h
parent7b7c52ad2abd228138ba1a948d5e28bf6dc3b880 (diff)
downloadATCD-53284e215e3d3351a7d7e9c4b68f14b427fb4377.tar.gz
ChangeLogTag:Wed Nov 1 14:11:48 2000 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'ace/Min_Max.h')
-rw-r--r--ace/Min_Max.h40
1 files changed, 18 insertions, 22 deletions
diff --git a/ace/Min_Max.h b/ace/Min_Max.h
index 5d3617c9096..cac64b2dcbc 100644
--- a/ace/Min_Max.h
+++ b/ace/Min_Max.h
@@ -1,26 +1,22 @@
// -*- C++ -*-
-// $Id$
+
+//=============================================================================
+/**
+ * @file Min_Max.h
+ *
+ * $Id$
+ *
+ * Define an appropriate set of min()/max() functions using templates.
+ *
+ *
+ * @author Derek Dominish <Derek.Dominish@Australia.Boeing.com>
+ */
+//=============================================================================
#ifndef ACE_MIN_MAX_H
#define ACE_MIN_MAX_H
#include "ace/pre.h"
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Min_Max.h
-//
-// = DESCRIPTION
-// Define an appropriate set of min()/max() functions using templates.
-//
-// = AUTHOR
-// Derek Dominish <Derek.Dominish@Australia.Boeing.com>
-//
-// ============================================================================
-
# if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
# endif /* ACE_LACKS_PRAGMA_ONCE */
@@ -34,22 +30,22 @@ ace_min (const T &t1, const T &t2)
}
template <class T>
-inline const T &
-ace_max (const T &t1, const T &t2)
+inline const T &
+ace_max (const T &t1, const T &t2)
{
return t1 > t2 ? t1 : t2;
}
template <class T>
inline const T &
-ace_min (const T &t1, const T &t2, const T &t3)
+ace_min (const T &t1, const T &t2, const T &t3)
{
return ace_min (ace_min (t1, t2), t3);
}
template <class T>
inline const T &
-ace_max (const T &t1, const T &t2, const T &t3)
+ace_max (const T &t1, const T &t2, const T &t3)
{
return ace_max (ace_max (t1, t2), t3);
}
@@ -62,7 +58,7 @@ ace_range (const T &min, const T &max, const T &val)
}
# else
// These macros should only be used if a C++ compiler can't grok the
-// inline templates
+// inline templates
# define ace_min(a,b) (((b) > (a)) ? (a) : (b))
# define ace_max(a,b) (((a) > (b)) ? (a) : (b))
# define ace_range(a,b,c) (ace_min(ace_max((a), (c)), (b))