diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2021-07-31 00:57:23 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2021-07-31 00:57:23 +0200 |
| commit | 2f3fe5019b617756417c10c47e070cb278bc44df (patch) | |
| tree | 11cfc1e350a69ce3989b37a0c442588e820da4af | |
| parent | 879046ef83920e8b78e283c2b9bb3e37214315b4 (diff) | |
| download | river-2f3fe5019b617756417c10c47e070cb278bc44df.tar.gz river-2f3fe5019b617756417c10c47e070cb278bc44df.tar.xz | |
util: remove unused function
| -rw-r--r-- | river/util.zig | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/river/util.zig b/river/util.zig index ceeea07..21419bb 100644 --- a/river/util.zig +++ b/river/util.zig @@ -20,13 +20,3 @@ const os = std.os; /// The global general-purpose allocator used throughout river's code pub const gpa = std.heap.c_allocator; - -/// Take a pointer to c_void and cast it to a pointer to T. This function -/// exists to avoid having the verbosity of the required alignment casts all -/// over the code. -pub fn voidCast(comptime T: type, ptr: anytype) *T { - // See https://github.com/ziglang/zig/issues/5618 - if (@TypeOf(ptr) != *c_void) - @compileError("voidCast takes *c_void but " ++ @typeName(@TypeOf(ptr)) ++ " was provided"); - return @ptrCast(*T, @alignCast(@alignOf(*T), ptr)); -} |
