fix osx abs ambiguity (#142)

This commit is contained in:
Kai Lehmkuehler
2018-11-05 20:12:54 +01:00
committed by Jason Watkins
parent cf6a45fb87
commit 7fd4d4d6b2

View File

@@ -66,7 +66,8 @@
// System Includes
#include <cstdlib>
#include <cstring>
#include <cstring>
#include <cmath>
#ifdef __APPLE__
#include <mach/mach_time.h>
#endif
@@ -95,8 +96,7 @@ PLUGIN_API int XPluginStart(char* outName, char* outSig, char* outDesc)
strcpy(outDesc, "X Plane Communications Toolbox\nCopyright (c) 2013-2018 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All Rights Reserved.");
#if (__APPLE__)
int (*_abs)( int ) = & std::abs; // Needed to resolve ambiguity for OS X compilation
if ( _abs(timeConvert) <= 1e-9 ) // is about 0
if ( abs(timeConvert) <= 1e-9 ) // is about 0
{
mach_timebase_info_data_t timeBase;
(void)mach_timebase_info(&timeBase);