mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
Remove 64 bit atomics in main crate (#8037)
This allows the base egui crate to run on platforms without 64 bit atomics * Addresses <https://github.com/emilk/egui/issues/7692>, but does not address the `egui_extras` crate * [x] I have followed the instructions in the PR template
This commit is contained in:
@@ -3,7 +3,7 @@ use std::{
|
||||
collections::BTreeMap,
|
||||
sync::{
|
||||
Arc,
|
||||
atomic::{AtomicU64, Ordering},
|
||||
atomic::{AtomicUsize, Ordering},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -439,7 +439,7 @@ impl FontFaceKey {
|
||||
pub const INVALID: Self = Self(0);
|
||||
|
||||
fn new() -> Self {
|
||||
static KEY_COUNTER: AtomicU64 = AtomicU64::new(1);
|
||||
static KEY_COUNTER: AtomicUsize = AtomicUsize::new(1);
|
||||
Self(crate::util::hash(
|
||||
KEY_COUNTER.fetch_add(1, Ordering::Relaxed),
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user