ecs: rename sort function to be camelCase (#628)

Co-authored-by: Aaron Winter <wintera@Aarons-MacBook-Pro.local>
This commit is contained in:
Aaron Winter 2022-11-27 04:42:15 +01:00 committed by GitHub
parent 568d0155fd
commit a06ac6356d
Failed to generate hash of commit

View file

@ -28,7 +28,7 @@ const Column = struct {
offset: usize, offset: usize,
}; };
fn by_alignment_name(context: void, lhs: Column, rhs: Column) bool { fn byAlignmentName(context: void, lhs: Column, rhs: Column) bool {
_ = context; _ = context;
if (lhs.alignment < rhs.alignment) return true; if (lhs.alignment < rhs.alignment) return true;
return std.mem.lessThan(u8, lhs.name, rhs.name); return std.mem.lessThan(u8, lhs.name, rhs.name);
@ -580,7 +580,7 @@ pub fn Entities(comptime all_components: anytype) type {
.alignment = if (@sizeOf(@TypeOf(component)) == 0) 1 else @alignOf(@TypeOf(component)), .alignment = if (@sizeOf(@TypeOf(component)) == 0) 1 else @alignOf(@TypeOf(component)),
.offset = undefined, .offset = undefined,
}; };
std.sort.sort(Column, columns, {}, by_alignment_name); std.sort.sort(Column, columns, {}, byAlignmentName);
archetype_entry.value_ptr.* = ArchetypeStorage{ archetype_entry.value_ptr.* = ArchetypeStorage{
.allocator = entities.allocator, .allocator = entities.allocator,