aboutsummaryrefslogtreecommitdiff
path: root/std/debug/index.zig
diff options
context:
space:
mode:
authorSahnvour <sahnvour@pm.me>2019-01-12 20:13:06 +0100
committerSahnvour <sahnvour@pm.me>2019-01-18 10:35:00 +0100
commit5ab8db7b3ed902159f45a1c76e9c096439f6f0d7 (patch)
tree596ca4a8bb26e1c4dd3fbb13c43d041dc2028215 /std/debug/index.zig
parent404c87b06afbeebfea6c839665918c7bd1328d74 (diff)
downloadzig-5ab8db7b3ed902159f45a1c76e9c096439f6f0d7.tar.gz
zig-5ab8db7b3ed902159f45a1c76e9c096439f6f0d7.zip
removed unnecessary cast
Diffstat (limited to 'std/debug/index.zig')
-rw-r--r--std/debug/index.zig3
1 files changed, 1 insertions, 2 deletions
diff --git a/std/debug/index.zig b/std/debug/index.zig
index 3050d15c59..7948f5a388 100644
--- a/std/debug/index.zig
+++ b/std/debug/index.zig
@@ -247,8 +247,7 @@ pub fn writeCurrentStackTraceWindows(
start_addr: ?usize,
) !void {
var addr_buf: [1024]usize = undefined;
- const casted_len = @intCast(u32, addr_buf.len); // TODO shouldn't need this cast
- const n = windows.RtlCaptureStackBackTrace(0, casted_len, @ptrCast(**c_void, &addr_buf), null);
+ const n = windows.RtlCaptureStackBackTrace(0, addr_buf.len, @ptrCast(**c_void, &addr_buf), null);
const addrs = addr_buf[0..n];
var start_i: usize = if (start_addr) |saddr| blk: {
for (addrs) |addr, i| {