Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Lossy conversion from Int64/UInt64 to Int32/UInt32
Browse files Browse the repository at this point in the history
  • Loading branch information
david-swift committed Aug 25, 2024
1 parent 901e19c commit 018d21e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/Adwaita/Model/Extensions/Int.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ extension Int: Identifiable {
public var id: Int { self }
/// The C integer.
public var cInt: Int32 {
.init(self)
.init(truncatingIfNeeded: self)
}

}
2 changes: 1 addition & 1 deletion Sources/Adwaita/Model/Extensions/UInt.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ extension UInt {

/// Convert an unsigned integer into the C form.
public var cInt: UInt32 {
.init(self)
.init(truncatingIfNeeded: self)
}

}

0 comments on commit 018d21e

Please sign in to comment.