Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
892 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef MINMAX_H
  8. #define MINMAX_H
  9. // Remove the MSVC defines
  10. #ifdef min
  11. #undef min
  12. #endif
  13. #ifdef max
  14. #undef max
  15. #endif
  16. // On older GCC #include <algorithm> gets obliterated by our silly -Dfopen=dont_use_fopen define. Since the other
  17. // buildbots will fail if someone does use fopen, I'm partially turning off the safety here to fix this.
  18. // If you're getting some weird fopen error from this, it's because someone included stdio before this file. Usually
  19. // moving the basetypes.h include higher in the file that is exploding fixes this.
  20. #if defined( fopen ) && defined( __GNUC__ ) && __GNUC__ < 5
  21. #undef fopen
  22. #endif
  23. #include <algorithm>
  24. using std::min;
  25. using std::max;
  26. #endif // MINMAX_H