MSVC compilation fixes
This commit is contained in:
@@ -218,7 +218,7 @@ private:
|
||||
};
|
||||
typedef OnePole<2> StereoOnePole;
|
||||
|
||||
template<ch_cnt_t CHANNELS>
|
||||
template<ch_cnt_t CHANNELS=DEFAULT_CHANNELS>
|
||||
class BasicFilters
|
||||
{
|
||||
MM_OPERATORS
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "MidiEvent.h"
|
||||
#include "VstSyncData.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <vector>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
@@ -234,7 +235,7 @@ public:
|
||||
// recursive lock
|
||||
inline void lock()
|
||||
{
|
||||
if( !isInvalid() && __sync_add_and_fetch( &m_lockDepth, 1 ) == 1 )
|
||||
if( !isInvalid() && m_lockDepth.fetch_add( 1 ) == 0 )
|
||||
{
|
||||
m_dataSem.acquire();
|
||||
}
|
||||
@@ -243,7 +244,7 @@ public:
|
||||
// recursive unlock
|
||||
inline void unlock()
|
||||
{
|
||||
if( __sync_sub_and_fetch( &m_lockDepth, 1) <= 0 )
|
||||
if( m_lockDepth.fetch_sub( 1 ) <= 1 )
|
||||
{
|
||||
m_dataSem.release();
|
||||
}
|
||||
@@ -404,7 +405,7 @@ private:
|
||||
shmData * m_data;
|
||||
QSystemSemaphore m_dataSem;
|
||||
QSystemSemaphore m_messageSem;
|
||||
volatile int m_lockDepth;
|
||||
std::atomic_int m_lockDepth;
|
||||
|
||||
} ;
|
||||
#endif
|
||||
|
||||
@@ -174,6 +174,7 @@ private:
|
||||
TrackContainerView* m_trackContainerView;
|
||||
|
||||
} ;
|
||||
friend class TrackContainerView::scrollArea;
|
||||
|
||||
TrackContainer* m_tc;
|
||||
typedef QList<TrackView *> trackViewList;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "lmmsconfig.h"
|
||||
|
||||
#ifdef LMMS_HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#include <cstdint>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -59,6 +59,9 @@ typedef uint32_t jo_id_t; // (unique) ID of a journalling object
|
||||
#define likely(x) Q_LIKELY(x)
|
||||
#define unlikely(x) Q_UNLIKELY(x)
|
||||
|
||||
// windows headers define "min" and "max" macros, breaking the methods bwloe
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
template<typename T>
|
||||
struct typeInfo
|
||||
|
||||
Reference in New Issue
Block a user