ecs: rename sort function to be camelCase (#628)
Co-authored-by: Aaron Winter <wintera@Aarons-MacBook-Pro.local>
This commit is contained in:
parent
568d0155fd
commit
a06ac6356d
1 changed files with 2 additions and 2 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue