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 {
18
18
SynchronizedQueue () = default ;
19
19
20
20
bool enqueue (T& data) {
21
- LockGuard ( mutex) ;
21
+ LockGuard guard{ mutex}; ;
22
22
return l.push_front (data);
23
23
}
24
24
25
25
bool peek (T& data) {
26
- LockGuard ( mutex) ;
26
+ LockGuard guard{ mutex}; ;
27
27
if (l.end ()->prior == nullptr ) return false ;
28
28
data = *(l.end ()->prior );
29
29
return true ;
30
30
}
31
31
32
32
bool dequeue (T& data) {
33
- LockGuard ( mutex) ;
33
+ LockGuard guard{ mutex}; ;
34
34
return l.pop_back (data);
35
35
}
36
36
37
37
size_t size () {
38
- LockGuard ( mutex) ;
38
+ LockGuard guard{ mutex}; ;
39
39
return l.size ();
40
40
}
41
41
42
42
bool clear () {
43
- LockGuard ( mutex) ;
43
+ LockGuard guard{ mutex}; ;
44
44
return l.clear ();
45
45
}
46
46
47
47
bool empty () {
48
- LockGuard ( mutex) ;
48
+ LockGuard guard{ mutex}; ;
49
49
return l.empty ();
50
50
}
51
51
You can’t perform that action at this time.
0 commit comments