Use comptime for fully declarative LV2 and Custom commands #14
1 changed files with 1 additions and 2 deletions
|
@ -75,7 +75,7 @@ pub fn sseek(file: *c.SNDFILE, offset: usize) void {
|
|||
/// Caller owns the returned memory.
|
||||
pub fn temporaryName(allocator: *std.mem.Allocator) ![]u8 {
|
||||
const template_start = "/temp/temp_";
|
||||
const template = "/tmp/temp_XXXXXXXXXXX";
|
||||
const template = "/tmp/temp_XXXXXXXXXXXXXXXXXXXXX";
|
||||
var nam = try allocator.alloc(u8, template.len);
|
||||
std.mem.copy(u8, nam, template);
|
||||
|
||||
|
@ -86,7 +86,6 @@ pub fn temporaryName(allocator: *std.mem.Allocator) ![]u8 {
|
|||
|
||||
var i: usize = 0;
|
||||
while (i < 100) : (i += 1) {
|
||||
|
||||
// generate a random uppercase letter, that is, 65 + random number.
|
||||
for (fill) |_, f_idx| {
|
||||
var idx = @intCast(u8, r.random.uintLessThan(u5, 24));
|
||||
|
|
Loading…
Reference in a new issue