[PR #156] [CLOSED] Get rid of unsafeBitCast(_:to:)​​​. #468

Closed
opened 2025-12-29 15:32:28 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JohnEstropia/CoreStore/pull/156
Author: @ruslanskorb
Created: 3/24/2017
Status: Closed

Base: developHead: get-rid-of-unsafeBitCast


📝 Commits (1)

  • 6ed0275 Get rid of unsafeBitCast(_:to:)​​​.

📊 Changes

4 files changed (+4 additions, -4 deletions)

View changed files

📝 Sources/Internal/CoreStoreFetchRequest+CoreStore.swift (+1 -1)
📝 Sources/Internal/CoreStoreFetchedResultsController.swift (+1 -1)
📝 Sources/Observing/ListMonitor.swift (+1 -1)
📝 Sources/Observing/ObjectMonitor.swift (+1 -1)

📄 Description

To perform a reference cast, use the casting operators (as, as!, or as?) or the unsafe​Downcast(_:​to:​) function. Do not use unsafe​Bit​Cast(_:​to:​) with class or pointer types; doing so may introduce undefined behavior.

https://developer.apple.com/reference/swift/1641250-unsafebitcast


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JohnEstropia/CoreStore/pull/156 **Author:** [@ruslanskorb](https://github.com/ruslanskorb) **Created:** 3/24/2017 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `get-rid-of-unsafeBitCast` --- ### 📝 Commits (1) - [`6ed0275`](https://github.com/JohnEstropia/CoreStore/commit/6ed0275f5d3fbfcb666f97d6717e5db477ad6b51) Get rid of `unsafeBitCast(_:to:)​​​`. ### 📊 Changes **4 files changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `Sources/Internal/CoreStoreFetchRequest+CoreStore.swift` (+1 -1) 📝 `Sources/Internal/CoreStoreFetchedResultsController.swift` (+1 -1) 📝 `Sources/Observing/ListMonitor.swift` (+1 -1) 📝 `Sources/Observing/ObjectMonitor.swift` (+1 -1) </details> ### 📄 Description To perform a reference cast, use the casting operators (`as`, `as!`, or `as?`) or the `unsafe​Downcast(_:​to:​)` function. Do not use `unsafe​Bit​Cast(_:​to:​)` with class or pointer types; doing so may introduce undefined behavior. https://developer.apple.com/reference/swift/1641250-unsafebitcast --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 15:32:28 +01:00
adam closed this issue 2025-12-29 15:32:28 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#468