mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-09-07 19:21:14 -04:00
Fix formatting
This commit is contained in:
parent
73bbdcc033
commit
824840a776
@ -50,13 +50,7 @@ fn findValidFolderName(allocator: NeverFailingAllocator, name: []const u8) []con
|
|||||||
defer main.stackAllocator.free(escapedName);
|
defer main.stackAllocator.free(escapedName);
|
||||||
for(name, 0..) |char, i| {
|
for(name, 0..) |char, i| {
|
||||||
escapedName[i] = switch(char) {
|
escapedName[i] = switch(char) {
|
||||||
'a'...'z',
|
'a'...'z', 'A'...'Z', '0'...'9', '_', '-', '.', ' ' => char,
|
||||||
'A'...'Z',
|
|
||||||
'0'...'9',
|
|
||||||
'_',
|
|
||||||
'-',
|
|
||||||
'.',
|
|
||||||
' ' => char,
|
|
||||||
128...255 => char,
|
128...255 => char,
|
||||||
else => '-',
|
else => '-',
|
||||||
};
|
};
|
||||||
|
@ -140,7 +140,7 @@ pub fn onOpen() void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std.sort.insertion(WorldInfo, worldList.items, {}, struct {
|
std.sort.insertion(WorldInfo, worldList.items, {}, struct {
|
||||||
fn lessThan(_: void, lhs: WorldInfo, rhs: WorldInfo)bool {
|
fn lessThan(_: void, lhs: WorldInfo, rhs: WorldInfo) bool {
|
||||||
return rhs.lastUsedTime -% lhs.lastUsedTime < 0;
|
return rhs.lastUsedTime -% lhs.lastUsedTime < 0;
|
||||||
}
|
}
|
||||||
}.lessThan);
|
}.lessThan);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user