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

Diff for: DTTableViewManager.xcodeproj/project.pbxproj

+4-4
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
};

Diff for: DTTableViewManager.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"originHash" : "be4f6867adfebf7a2a613fab8cbb79ea7c62c436f1182c9af68110069060528d",
23
"pins" : [
34
{
45
"identity" : "changeset",
@@ -15,9 +16,9 @@
1516
"location" : "https://github.com/DenTelezhkin/DTModelStorage",
1617
"state" : {
1718
"branch" : "main",
18-
"revision" : "49f408f61d61917f31d1dd2ccba73813c7698f1f"
19+
"revision" : "1473c7ed4970b9572e93cf0305c80d54855b3cdf"
1920
}
2021
}
2122
],
22-
"version" : 2
23+
"version" : 3
2324
}

Diff for: Sources/DTTableViewManager/DTTableViewDelegate.swift

+2
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

Diff for: Sources/DTTableViewManager/DTTableViewManager.swift

+3-1
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)