mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-13 06:28:36 +00:00
Use compare_exchange and not compare_and_swap
This commit is contained in:
parent
eada611c2c
commit
65bfc1469e
@ -199,7 +199,11 @@ fn check_multiple_winits() {
|
||||
// Note that the `Ordering` basically doesn't matter here, but even if it
|
||||
// did, `Relaxed` is still correct because we're only interested in the
|
||||
// effects on a single atomic variable.
|
||||
if winits_enabled <= 1 || COMPLAINED.compare_and_swap(false, true, Ordering::Relaxed) {
|
||||
if winits_enabled <= 1
|
||||
|| COMPLAINED
|
||||
.compare_exchange(false, true, Ordering::Relaxed, Ordering::Relaxed)
|
||||
.is_err()
|
||||
{
|
||||
return;
|
||||
}
|
||||
let mut err = Vec::with_capacity(512);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user