diff --git a/pcbnew/footprint_preview_panel.cpp b/pcbnew/footprint_preview_panel.cpp index a91bcebd87..2bc3f96a02 100644 --- a/pcbnew/footprint_preview_panel.cpp +++ b/pcbnew/footprint_preview_panel.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -36,8 +37,6 @@ #include - - /** * Threadsafe interface class between loader thread and panel class. */ @@ -49,7 +48,7 @@ class FP_THREAD_IFACE /// Retrieve a cache entry by LIB_ID boost::optional GetFromCache( LIB_ID const & aFPID ) { - wxMutexLocker lock( m_lock ); + MUTLOCK lock( m_lock ); auto it = m_cachedFootprints.find( aFPID ); if( it != m_cachedFootprints.end() ) @@ -64,7 +63,7 @@ class FP_THREAD_IFACE */ CACHE_ENTRY AddToQueue( LIB_ID const & aEntry ) { - wxMutexLocker lock( m_lock ); + MUTLOCK lock( m_lock ); CACHE_ENTRY ent = { aEntry, NULL, FPS_LOADING }; m_cachedFootprints[aEntry] = ent; @@ -76,7 +75,7 @@ class FP_THREAD_IFACE /// Pop an entry from the queue, or empty option if none is available. boost::optional PopFromQueue() { - wxMutexLocker lock( m_lock ); + MUTLOCK lock( m_lock ); if( m_loaderQueue.empty() ) { @@ -93,7 +92,7 @@ class FP_THREAD_IFACE /// Add an entry to the cache. void AddToCache( CACHE_ENTRY const & aEntry ) { - wxMutexLocker lock( m_lock ); + MUTLOCK lock( m_lock ); m_cachedFootprints[aEntry.fpid] = aEntry; } @@ -103,7 +102,7 @@ class FP_THREAD_IFACE */ void SetCurrentFootprint( LIB_ID aFp ) { - wxMutexLocker lock( m_lock ); + MUTLOCK lock( m_lock ); m_current_fp = aFp; } @@ -112,7 +111,7 @@ class FP_THREAD_IFACE */ LIB_ID GetCurrentFootprint() { - wxMutexLocker lock( m_lock ); + MUTLOCK lock( m_lock ); return m_current_fp; } @@ -120,7 +119,7 @@ class FP_THREAD_IFACE std::deque m_loaderQueue; std::map m_cachedFootprints; LIB_ID m_current_fp; - wxMutex m_lock; + MUTEX m_lock; };