File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/AudioTools/Concurrency Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -18,34 +18,34 @@ class SynchronizedQueue {
1818 SynchronizedQueue () = default ;
1919
2020 bool enqueue (T& data) {
21- LockGuard ( mutex) ;
21+ LockGuard guard{ mutex}; ;
2222 return l.push_front (data);
2323 }
2424
2525 bool peek (T& data) {
26- LockGuard ( mutex) ;
26+ LockGuard guard{ mutex}; ;
2727 if (l.end ()->prior == nullptr ) return false ;
2828 data = *(l.end ()->prior );
2929 return true ;
3030 }
3131
3232 bool dequeue (T& data) {
33- LockGuard ( mutex) ;
33+ LockGuard guard{ mutex}; ;
3434 return l.pop_back (data);
3535 }
3636
3737 size_t size () {
38- LockGuard ( mutex) ;
38+ LockGuard guard{ mutex}; ;
3939 return l.size ();
4040 }
4141
4242 bool clear () {
43- LockGuard ( mutex) ;
43+ LockGuard guard{ mutex}; ;
4444 return l.clear ();
4545 }
4646
4747 bool empty () {
48- LockGuard ( mutex) ;
48+ LockGuard guard{ mutex}; ;
4949 return l.empty ();
5050 }
5151
You can’t perform that action at this time.
0 commit comments