aboutsummaryrefslogtreecommitdiff
path: root/lib/std/multi_array_list.zig
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2022-12-18 19:33:15 +0200
committerGitHub <noreply@github.com>2022-12-18 19:33:15 +0200
commit40ed6ae8469fd599f0524d294f38365c3bb8a825 (patch)
tree6e37bbb58fef1ca3aae06e65e179dfa017cb7929 /lib/std/multi_array_list.zig
parente9e804edc899d8392c9f93a19b92be603c26df79 (diff)
parent2a5e1426aa9469fadb78e837d0100d689213b034 (diff)
downloadzig-40ed6ae8469fd599f0524d294f38365c3bb8a825.tar.gz
zig-40ed6ae8469fd599f0524d294f38365c3bb8a825.zip
Merge pull request #13930 from r00ster91/renamings
std.builtin: renamings
Diffstat (limited to 'lib/std/multi_array_list.zig')
-rw-r--r--lib/std/multi_array_list.zig26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/std/multi_array_list.zig b/lib/std/multi_array_list.zig
index e05b87c0be..38c8276b9a 100644
--- a/lib/std/multi_array_list.zig
+++ b/lib/std/multi_array_list.zig
@@ -84,9 +84,9 @@ pub fn MultiArrayList(comptime S: type) type {
var data: [fields.len]Data = undefined;
for (fields) |field_info, i| {
data[i] = .{
- .size = @sizeOf(field_info.field_type),
+ .size = @sizeOf(field_info.type),
.size_index = i,
- .alignment = if (@sizeOf(field_info.field_type) == 0) 1 else field_info.alignment,
+ .alignment = if (@sizeOf(field_info.type) == 0) 1 else field_info.alignment,
};
}
const Sort = struct {
@@ -294,10 +294,10 @@ pub fn MultiArrayList(comptime S: type) type {
) catch {
const self_slice = self.slice();
inline for (fields) |field_info, i| {
- if (@sizeOf(field_info.field_type) != 0) {
+ if (@sizeOf(field_info.type) != 0) {
const field = @intToEnum(Field, i);
const dest_slice = self_slice.items(field)[new_len..];
- const byte_count = dest_slice.len * @sizeOf(field_info.field_type);
+ const byte_count = dest_slice.len * @sizeOf(field_info.type);
// We use memset here for more efficient codegen in safety-checked,
// valgrind-enabled builds. Otherwise the valgrind client request
// will be repeated for every element.
@@ -316,9 +316,9 @@ pub fn MultiArrayList(comptime S: type) type {
const self_slice = self.slice();
const other_slice = other.slice();
inline for (fields) |field_info, i| {
- if (@sizeOf(field_info.field_type) != 0) {
+ if (@sizeOf(field_info.type) != 0) {
const field = @intToEnum(Field, i);
- mem.copy(field_info.field_type, other_slice.items(field), self_slice.items(field));
+ mem.copy(field_info.type, other_slice.items(field), self_slice.items(field));
}
}
gpa.free(self.allocatedBytes());
@@ -377,9 +377,9 @@ pub fn MultiArrayList(comptime S: type) type {
const self_slice = self.slice();
const other_slice = other.slice();
inline for (fields) |field_info, i| {
- if (@sizeOf(field_info.field_type) != 0) {
+ if (@sizeOf(field_info.type) != 0) {
const field = @intToEnum(Field, i);
- mem.copy(field_info.field_type, other_slice.items(field), self_slice.items(field));
+ mem.copy(field_info.type, other_slice.items(field), self_slice.items(field));
}
}
gpa.free(self.allocatedBytes());
@@ -396,9 +396,9 @@ pub fn MultiArrayList(comptime S: type) type {
const self_slice = self.slice();
const result_slice = result.slice();
inline for (fields) |field_info, i| {
- if (@sizeOf(field_info.field_type) != 0) {
+ if (@sizeOf(field_info.type) != 0) {
const field = @intToEnum(Field, i);
- mem.copy(field_info.field_type, result_slice.items(field), self_slice.items(field));
+ mem.copy(field_info.type, result_slice.items(field), self_slice.items(field));
}
}
return result;
@@ -413,10 +413,10 @@ pub fn MultiArrayList(comptime S: type) type {
pub fn swap(sc: @This(), a_index: usize, b_index: usize) void {
inline for (fields) |field_info, i| {
- if (@sizeOf(field_info.field_type) != 0) {
+ if (@sizeOf(field_info.type) != 0) {
const field = @intToEnum(Field, i);
const ptr = sc.slice.items(field);
- mem.swap(field_info.field_type, &ptr[a_index], &ptr[b_index]);
+ mem.swap(field_info.type, &ptr[a_index], &ptr[b_index]);
}
}
}
@@ -449,7 +449,7 @@ pub fn MultiArrayList(comptime S: type) type {
}
fn FieldType(comptime field: Field) type {
- return meta.fieldInfo(S, field).field_type;
+ return meta.fieldInfo(S, field).type;
}
/// This function is used in tools/zig-gdb.py to fetch the child type to facilitate