Skip to content

Commit 296e773

Browse files
committed
Fixed a few straightforward warnings in PlaygroundLogger.
1 parent d6f254a commit 296e773

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

PlaygroundLogger/PlaygroundLogger/CustomLoggable/SpriteKit/SpriteKitOpaqueLoggable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import SpriteKit
1818
}
1919
}
2020

21-
fileprivate protocol SpriteKitOpaqueLoggable: class, OpaqueImageRepresentable, CustomOpaqueLoggable {}
21+
fileprivate protocol SpriteKitOpaqueLoggable: AnyObject, OpaqueImageRepresentable, CustomOpaqueLoggable {}
2222

2323
extension SpriteKitOpaqueLoggable {
2424
func encodeImage(into encoder: LogEncoder, withFormat format: LogEncoder.Format) throws {

PlaygroundLogger/PlaygroundLoggerTests/LegacyPlaygroundLoggerTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ extension UInt64 {
894894

895895
init? (eightBytesStorage: BytesStorage) {
896896
if !eightBytesStorage.has(8) { return nil }
897-
var up_byte = UnsafeMutablePointer<UInt8>.allocate(capacity: 8)
897+
let up_byte = UnsafeMutablePointer<UInt8>.allocate(capacity: 8)
898898
defer { up_byte.deallocate() }
899899
for idx in 0..<8 {
900900
up_byte[idx] = eightBytesStorage.get()
@@ -958,7 +958,7 @@ extension Bool {
958958

959959
extension Float {
960960
init? (storage: BytesStorage) {
961-
var ubPtr = UnsafeMutablePointer<UInt8>.allocate(capacity: 4)
961+
let ubPtr = UnsafeMutablePointer<UInt8>.allocate(capacity: 4)
962962
defer { ubPtr.deallocate() }
963963
for idx in 0..<4 {
964964
ubPtr[idx] = storage.get()
@@ -973,7 +973,7 @@ extension Float {
973973

974974
extension Double {
975975
init? (storage: BytesStorage) {
976-
var ubPtr = UnsafeMutablePointer<UInt8>.allocate(capacity: 8)
976+
let ubPtr = UnsafeMutablePointer<UInt8>.allocate(capacity: 8)
977977
defer { ubPtr.deallocate() }
978978
for idx in 0..<8 {
979979
ubPtr[idx] = storage.get()

0 commit comments

Comments
 (0)