Added workaround for MSVC 2017 internal compiler error

game-music-emu\gme\fir_resampler.cpp(28): fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 256)
This commit is contained in:
alexey.lysiuk 2017-10-29 16:14:04 +02:00
parent 415ed57713
commit ea6daf0212
1 changed files with 8 additions and 0 deletions

View File

@ -23,6 +23,10 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
#undef PI #undef PI
#define PI 3.1415926535897932384626433832795029 #define PI 3.1415926535897932384626433832795029
#if _MSC_VER >= 1911 && defined _M_X64
#pragma float_control(precise, on, push)
#endif // _MSC_VER >= 1911 && _M_X64
static void gen_sinc( double rolloff, int width, double offset, double spacing, double scale, static void gen_sinc( double rolloff, int width, double offset, double spacing, double scale,
int count, short* out ) int count, short* out )
{ {
@ -52,6 +56,10 @@ static void gen_sinc( double rolloff, int width, double offset, double spacing,
} }
} }
#if _MSC_VER >= 1911 && defined _M_X64
#pragma float_control(pop)
#endif // _MSC_VER >= 1911 && _M_X64
Fir_Resampler_::Fir_Resampler_( int width, sample_t* impulses_ ) : Fir_Resampler_::Fir_Resampler_( int width, sample_t* impulses_ ) :
width_( width ), width_( width ),
write_offset( width * stereo - stereo ), write_offset( width * stereo - stereo ),