Expand macro to fix gcc-7 portability warning

gcc-7 warns:

    similar/main/mglobal.cpp:119:5: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
     #if DXX_VALPTRIDX_ENABLE_FULL_TEMPLATE_INSTANTIATION

Fix this by using the long form of the definition.
This commit is contained in:
Kp 2017-06-10 03:31:03 +00:00
parent 5b12f28564
commit 0e57e9bbf7

View file

@ -113,7 +113,11 @@ valptridx<wall>::array_managed_type Walls;
* classes that are known to be used.
*/
#ifndef DXX_VALPTRIDX_ENABLE_FULL_TEMPLATE_INSTANTIATION
#define DXX_VALPTRIDX_ENABLE_FULL_TEMPLATE_INSTANTIATION !(defined(__OPTIMIZE__) && __OPTIMIZE__ > 0)
#if (defined(__OPTIMIZE__) && __OPTIMIZE__ > 0)
#define DXX_VALPTRIDX_ENABLE_FULL_TEMPLATE_INSTANTIATION 0
#else
#define DXX_VALPTRIDX_ENABLE_FULL_TEMPLATE_INSTANTIATION 1
#endif
#endif
#if DXX_VALPTRIDX_ENABLE_FULL_TEMPLATE_INSTANTIATION