File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
plugins/LadspaEffect/caps/dsp Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 2424 #define fistp (f,i) \
2525 __asm__ (" fistpl %0" : " =m" (i) : "t" (f) : "st")
2626#else /* ! __i386__ */
27- #define fstcw (i )
28- #define fldcw (i )
27+ #include < cstdint>
2928
30- #define fistp (f,i ) \
31- i = (int ) f
29+ inline void fistp (float f, int32_t & i) { i = static_cast <int32_t >(f); }
3230#endif
3331
3432namespace DSP {
3533
3634class FPTruncateMode
3735{
3836 public:
39- int cw0, cw1; /* fp control word */
37+ #ifdef __i386__
38+ int cw0; /* fp control word */
4039
4140 FPTruncateMode ()
4241 {
4342 fstcw (cw0);
44- cw1 = cw0 | 0xC00 ;
43+ const int cw1 = cw0 | 0xC00 ;
4544 fldcw (cw1);
4645 }
4746
4847 ~FPTruncateMode ()
4948 {
5049 fldcw (cw0);
5150 }
51+ #else
52+ // Avoid warnings about unused variables
53+ FPTruncateMode () { (void )0 ; }
54+ ~FPTruncateMode () { (void )0 ; }
55+ #endif
5256};
5357
5458} /* namespace DSP */
You can’t perform that action at this time.
0 commit comments