More refactors around assets. Trust me, we need them

This commit is contained in:
2025-12-04 23:31:30 +01:00
parent d885fbea43
commit a372bcb981
13 changed files with 868 additions and 592 deletions

View File

@@ -1,9 +1,9 @@
//! Module for string interning. A string can be converted to a stable integer
//! constant, called an *atom*. The value of an for a given string is guaranteed
//! to be stable throughout a program's runtime, but not across different runs.
//! There can be no more than 2¹⁶ atoms.
//! constant, called an *atom*. The value of an atom for a given string is
//! guaranteed to be stable throughout a program's runtime, but not across
//! different runs. There can be no more than 2¹⁶ atoms.
//!
//! Use this module for converting string IDs into numbers, so that they can be
//! Use this module to convert string IDs into numbers, so that they can be
//! compared more easily. The users of this module should import it with
//! `@import("Atom.zig").Atom` and use the methods available in the `Atom` type.
@@ -76,7 +76,7 @@ pub const Atom = enum(u16) {
}
/// Cast an atom into an integer.
pub fn toInt(self: Atom) u32 {
pub fn toInt(self: Atom) u16 {
return @intFromEnum(self);
}