diff --git a/src/cxxTemplates/Makefile.Host b/src/cxxTemplates/Makefile.Host index dcd95d5b3..aec04a573 100644 --- a/src/cxxTemplates/Makefile.Host +++ b/src/cxxTemplates/Makefile.Host @@ -6,7 +6,7 @@ INC += resourceLib.cc INC += tsDLList.h INC += tsSLList.h INC += tsBTree.h -INC += minmax.h +INC += tsMinMax.h include $(TOP)/config/RULES.Host diff --git a/src/cxxTemplates/minmax.h b/src/cxxTemplates/minmax.h deleted file mode 100644 index 772416607..000000000 --- a/src/cxxTemplates/minmax.h +++ /dev/null @@ -1,22 +0,0 @@ - -// -// simple inline template functions to replace the min() and max() -// macros -// - -// -// ??? g++ 2.7.2 -Winline is unable to in line these tiny functions ??? -// - -template -inline const T &max(const T &a, const T &b) -{ - return (a>b) ? a : b; -} - -template -inline const T &min(const T &a, const T &b) -{ - return (a -#include "minmax.h" +#include "tsMinMax.h" main () { diff --git a/src/cxxTemplates/tsMinMax.h b/src/cxxTemplates/tsMinMax.h new file mode 100644 index 000000000..1cab10dee --- /dev/null +++ b/src/cxxTemplates/tsMinMax.h @@ -0,0 +1,18 @@ + +// +// simple type safe inline template functions to replace +// the min() and max() macros +// + +template +inline const T &tsMax(const T &a, const T &b) +{ + return (a>b) ? a : b; +} + +template +inline const T &tsMin(const T &a, const T &b) +{ + return (a -#include "minmax.h" +#include "tsMinMax.h" main () { diff --git a/src/libCom/cxxTemplates/tsMinMax.h b/src/libCom/cxxTemplates/tsMinMax.h new file mode 100644 index 000000000..1cab10dee --- /dev/null +++ b/src/libCom/cxxTemplates/tsMinMax.h @@ -0,0 +1,18 @@ + +// +// simple type safe inline template functions to replace +// the min() and max() macros +// + +template +inline const T &tsMax(const T &a, const T &b) +{ + return (a>b) ? a : b; +} + +template +inline const T &tsMin(const T &a, const T &b) +{ + return (a