Skip to content

Commit b77a42f

Browse files
committed
Fix warnings related to associated object keys.
1 parent 5e74222 commit b77a42f

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

DTTableViewManager.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,7 @@
11741174
GCC_WARN_UNINITIALIZED_AUTOS = YES;
11751175
GCC_WARN_UNUSED_FUNCTION = YES;
11761176
GCC_WARN_UNUSED_VARIABLE = YES;
1177-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
1177+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
11781178
MACOSX_DEPLOYMENT_TARGET = 10.15;
11791179
ONLY_ACTIVE_ARCH = YES;
11801180
OTHER_SWIFT_FLAGS = "-Xfrontend -warn-long-expression-type-checking=150";
@@ -1184,7 +1184,7 @@
11841184
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
11851185
SWIFT_VERSION = 5.0;
11861186
TARGETED_DEVICE_FAMILY = "1,2,3,4";
1187-
TVOS_DEPLOYMENT_TARGET = 11.0;
1187+
TVOS_DEPLOYMENT_TARGET = 12.0;
11881188
VERSIONING_SYSTEM = "apple-generic";
11891189
};
11901190
name = Debug;
@@ -1225,15 +1225,15 @@
12251225
GCC_WARN_UNINITIALIZED_AUTOS = YES;
12261226
GCC_WARN_UNUSED_FUNCTION = YES;
12271227
GCC_WARN_UNUSED_VARIABLE = YES;
1228-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
1228+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
12291229
MACOSX_DEPLOYMENT_TARGET = 10.15;
12301230
SDKROOT = iphoneos;
12311231
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos";
12321232
SWIFT_COMPILATION_MODE = wholemodule;
12331233
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
12341234
SWIFT_VERSION = 5.0;
12351235
TARGETED_DEVICE_FAMILY = "1,2,3,4";
1236-
TVOS_DEPLOYMENT_TARGET = 11.0;
1236+
TVOS_DEPLOYMENT_TARGET = 12.0;
12371237
VALIDATE_PRODUCT = YES;
12381238
VERSIONING_SYSTEM = "apple-generic";
12391239
};

DTTableViewManager.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/DTTableViewManager/DTTableViewDelegate.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ import DTModelStorage
2828

2929
/// Object, that implements `UITableViewDelegate` for `DTTableViewManager`.
3030
open class DTTableViewDelegate : DTTableViewDelegateWrapper, UITableViewDelegate {
31+
// swiftlint:disable:previous type_body_length
32+
3133
override func delegateWasReset() {
3234
tableView?.delegate = nil
3335
tableView?.delegate = self

Sources/DTTableViewManager/DTTableViewManager.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ public extension DTTableViewManageable {
4747
}
4848

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

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

0 commit comments

Comments
 (0)