Skip to content

Commit

Permalink
Fix warning: Forming 'UnsafeRawPointer' to an inout variable of type …
Browse files Browse the repository at this point in the history
…String exposes the internal representation rather than the string contents. (#16)
  • Loading branch information
linjie-firework committed May 20, 2024
1 parent 14e9a0b commit 48a0c89
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import UIKit

extension UILabel {
private struct AssociatedKeys {
static var hasCalculatedTextAlignment = "hasCalculatedTextAlignmentKey"
static var hasCalculatedTextAlignment: UInt8 = 0
}

private var hasCalculatedTextAlignment: Bool {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import UIKit

extension UITextField {
private struct AssociatedKeys {
static var hasCalculatedTextAlignment = "hasCalculatedTextAlignmentKey"
static var hasCalculatedTextAlignment: UInt8 = 0
}

private var hasCalculatedTextAlignment: Bool {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import UIKit

extension UITextView {
private struct AssociatedKeys {
static var hasCalculatedTextAlignment = "hasCalculatedTextAlignmentKey"
static var hasCalculatedTextAlignment: UInt8 = 0
}

private var hasCalculatedTextAlignment: Bool {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ typealias ReloadClosure = () -> Void

extension NSObject {
private struct AssociatedKeys {
static var reloadClosures = "reloadBlocks"
static var reloadClosures: UInt8 = 0
}

private var reloadClosures: [String: ReloadClosure] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import UIKit

extension CALayer {
private struct AssociatedKeys {
static var basicTransform = "basicTransform"
static var isRenderStartLayer = "isRenderStartLayer"
static var affineTransform = "affineTransform"
static var basicTransform: UInt8 = 0
static var isRenderStartLayer: UInt8 = 0
static var affineTransform: UInt8 = 0
}

static func swizzleLayerMethodsForLayoutFlip() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ enum LayoutFlipViewType: Int {

extension UIView {
private struct AssociatedKeys {
static var viewType = "viewType"
static var calculatedViewType = "calculatedViewType"
static var lastType = "lastType"
static var viewType: UInt8 = 0
static var calculatedViewType: UInt8 = 0
static var lastType: UInt8 = 0
}

static func swizzleViewMethodsForLayoutFlip() {
Expand Down

0 comments on commit 48a0c89

Please sign in to comment.