Cleanup: Remove double #ifdef WITH_TBB check

This commit is contained in:
Ray molenkamp 2022-03-26 09:55:08 -06:00
parent 9d25418a52
commit ffafe494f6
1 changed files with 8 additions and 11 deletions

View File

@ -3,23 +3,20 @@
#pragma once
#ifdef WITH_TBB
# ifdef WITH_TBB
/* Quiet top level deprecation message, unrelated to API usage here. */
# if defined(WIN32) && !defined(NOMINMAX)
# if defined(WIN32) && !defined(NOMINMAX)
/* TBB includes Windows.h which will define min/max macros causing issues
* when we try to use std::min and std::max later on. */
# define NOMINMAX
# define TBB_MIN_MAX_CLEANUP
# endif
# include <tbb/enumerable_thread_specific.h>
# ifdef WIN32
# define NOMINMAX
# define TBB_MIN_MAX_CLEANUP
# endif
# include <tbb/enumerable_thread_specific.h>
# ifdef WIN32
/* We cannot keep this defined, since other parts of the code deal with this on their own, leading
* to multiple define warnings unless we un-define this, however we can only undefine this if we
* were the ones that made the definition earlier. */
# ifdef TBB_MIN_MAX_CLEANUP
# undef NOMINMAX
# endif
# ifdef TBB_MIN_MAX_CLEANUP
# undef NOMINMAX
# endif
# endif
#endif