mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
all: zig fmt and rename "@XToY" to "@YFromX"
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
This commit is contained in:
committed by
Andrew Kelley
parent
a6c8ee5231
commit
50339f595a
@@ -32,7 +32,7 @@ const MultiArch = union(enum) {
|
||||
specific: Arch,
|
||||
|
||||
fn eql(a: MultiArch, b: MultiArch) bool {
|
||||
if (@enumToInt(a) != @enumToInt(b))
|
||||
if (@intFromEnum(a) != @intFromEnum(b))
|
||||
return false;
|
||||
if (a != .specific)
|
||||
return true;
|
||||
@@ -45,7 +45,7 @@ const MultiAbi = union(enum) {
|
||||
specific: Abi,
|
||||
|
||||
fn eql(a: MultiAbi, b: MultiAbi) bool {
|
||||
if (@enumToInt(a) != @enumToInt(b))
|
||||
if (@intFromEnum(a) != @intFromEnum(b))
|
||||
return false;
|
||||
if (std.meta.Tag(MultiAbi)(a) != .specific)
|
||||
return true;
|
||||
@@ -262,9 +262,9 @@ const DestTarget = struct {
|
||||
const HashContext = struct {
|
||||
pub fn hash(self: @This(), a: DestTarget) u32 {
|
||||
_ = self;
|
||||
return @enumToInt(a.arch) +%
|
||||
(@enumToInt(a.os) *% @as(u32, 4202347608)) +%
|
||||
(@enumToInt(a.abi) *% @as(u32, 4082223418));
|
||||
return @intFromEnum(a.arch) +%
|
||||
(@intFromEnum(a.os) *% @as(u32, 4202347608)) +%
|
||||
(@intFromEnum(a.abi) *% @as(u32, 4082223418));
|
||||
}
|
||||
|
||||
pub fn eql(self: @This(), a: DestTarget, b: DestTarget, b_index: usize) bool {
|
||||
|
||||
Reference in New Issue
Block a user