Reorganize everything #2

Merged
judah merged 6 commits from rejigger into master 2025-09-06 07:07:00 +00:00
2 changed files with 5 additions and 5 deletions
Showing only changes of commit 5447a4ee06 - Show all commits

View file

@ -32,8 +32,8 @@ Equal :: (lhs: []$T, rhs: []T) -> bool {
FindFlags :: enum_flags { FindFlags :: enum_flags {
Last; // The last matching element should be returned. Last; // Return the last matching element.
FromEnd; // The search be done in reverse. FromEnd; // Search in reverse.
} }
FindResult :: struct(T: Type) { FindResult :: struct(T: Type) {
@ -67,8 +67,8 @@ Contains :: (view: []$T, value: T) -> bool {
TrimFlags :: enum_flags { TrimFlags :: enum_flags {
FromStart; // The start of the array should be trimmed. FromStart; // Trim the start of the array.
FromEnd; // The end of the array should be trimmed. FromEnd; // Trim the end of the array.
MatchInFull; // Only trim when the cutset matches exactly. MatchInFull; // Only trim when the cutset matches exactly.
} }

View file

@ -45,7 +45,7 @@ offset_of :: (#discard value: $T, ident: Code, loc := #caller_location) -> int #
return offset_of(type, ident, loc = loc); return offset_of(type, ident, loc = loc);
} }
/// align_of returns the alignment of the given type. /// align_of returns the alignment of type T.
align_of :: ($T: Type) -> int #expand { align_of :: ($T: Type) -> int #expand {
return #run -> int { return #run -> int {
if size_of(T) == 0 if size_of(T) == 0