ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalcmagnetic_scattrelease-4.2.2ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change
on this file since 6d62b7f was
959eb01,
checked in by ajj, 8 years ago
|
normalising line endings
|
-
Property mode set to
100644
|
File size:
335 bytes
|
Rev | Line | |
---|
[959eb01] | 1 | #ifndef GUARD_minmax_H |
---|
| 2 | #define GUARD_minmax_H |
---|
| 3 | #ifdef _MSC_VER |
---|
| 4 | // needed to cope with bug in MS library: |
---|
| 5 | // it fails to define min/max |
---|
| 6 | |
---|
| 7 | template <class T> inline T max(const T& a, const T& b) |
---|
| 8 | { |
---|
| 9 | |
---|
| 10 | return (a > b) ? a : b; |
---|
| 11 | |
---|
| 12 | } |
---|
| 13 | |
---|
| 14 | template <class T> inline T min(const T& a, const T& b) |
---|
| 15 | { |
---|
| 16 | |
---|
| 17 | return (a < b) ? a : b; |
---|
| 18 | |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | #endif |
---|
| 22 | |
---|
[aa639ea] | 23 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.