Skip to content

Commit

Permalink
Fix warnings related to associated object keys.
Browse files Browse the repository at this point in the history
  • Loading branch information
DenTelezhkin committed Jul 16, 2024
1 parent 5e74222 commit b77a42f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
8 changes: 4 additions & 4 deletions DTTableViewManager.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = 10.15;
ONLY_ACTIVE_ARCH = YES;
OTHER_SWIFT_FLAGS = "-Xfrontend -warn-long-expression-type-checking=150";
Expand All @@ -1184,7 +1184,7 @@
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2,3,4";
TVOS_DEPLOYMENT_TARGET = 11.0;
TVOS_DEPLOYMENT_TARGET = 12.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
Expand Down Expand Up @@ -1225,15 +1225,15 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = 10.15;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2,3,4";
TVOS_DEPLOYMENT_TARGET = 11.0;
TVOS_DEPLOYMENT_TARGET = 12.0;
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"originHash" : "be4f6867adfebf7a2a613fab8cbb79ea7c62c436f1182c9af68110069060528d",
"pins" : [
{
"identity" : "changeset",
Expand All @@ -15,9 +16,9 @@
"location" : "https://github.com/DenTelezhkin/DTModelStorage",
"state" : {
"branch" : "main",
"revision" : "49f408f61d61917f31d1dd2ccba73813c7698f1f"
"revision" : "1473c7ed4970b9572e93cf0305c80d54855b3cdf"
}
}
],
"version" : 2
"version" : 3
}
2 changes: 2 additions & 0 deletions Sources/DTTableViewManager/DTTableViewDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import DTModelStorage

/// Object, that implements `UITableViewDelegate` for `DTTableViewManager`.
open class DTTableViewDelegate : DTTableViewDelegateWrapper, UITableViewDelegate {
// swiftlint:disable:previous type_body_length

override func delegateWasReset() {
tableView?.delegate = nil
tableView?.delegate = self
Expand Down
4 changes: 3 additions & 1 deletion Sources/DTTableViewManager/DTTableViewManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ public extension DTTableViewManageable {
}

/// This key is used to store `DTTableViewManager` instance on `DTTableViewManageable` class using object association.
private var DTTableViewManagerAssociatedKey = "DTTableViewManager Associated Key"
/// malloc is used per recommendation from Eskimo <3 https://forums.swift.org/t/handling-the-new-forming-unsaferawpointer-warning/65523/7
private var DTTableViewManagerAssociatedKey = malloc(1)!
// swiftlint:disable:previous force_unwrapping

/// Default implementation for `DTTableViewManageable` protocol, that will inject `manager` property to any object, that declares itself `DTTableViewManageable`.
extension DTTableViewManageable
Expand Down

0 comments on commit b77a42f

Please sign in to comment.