Skip to content

Conversation

@Sergio0694
Copy link
Member

Title. No actual code changes.

Removed redundant 'unsafe' modifiers from several classes and methods across ABI, Bindables, Collections, and InteropServices namespaces. This change improves code clarity and safety by limiting the use of 'unsafe' to where it is strictly required.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes unnecessary unsafe modifiers from class and method declarations throughout the codebase. The changes are purely modifier removals with no functional code changes - the methods and classes still work with unsafe code (pointers), but the unsafe keyword on the declaration itself was redundant since the containing contexts are already marked as unsafe.

Key changes:

  • Removed unsafe modifier from static class declarations
  • Removed unsafe modifier from method declarations that are already in unsafe contexts
  • No changes to method signatures, logic, or functionality

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
IAgileObjectImpl.cs Removed unsafe from static class declaration
WindowsRuntimeImports.cs Removed unsafe from partial method declaration
FreeThreadedObjectReference.cs Removed unsafe from override method declaration
WindowsRuntimeActivationHelper.cs Removed unsafe from five static method declarations
WindowsRuntimeEnumerator{T}.cs Removed unsafe from abstract class declaration
WindowsRuntimeIterator.cs Removed unsafe from sealed class declaration
IAsyncAction.cs Removed unsafe from static method in abstract class
INotifyPropertyChanged.cs Removed unsafe from static class declaration
INotifyCollectionChanged.cs Removed unsafe from static class declaration
IList.cs Removed unsafe from static class declaration
IEnumerator.cs Removed unsafe from static class declaration
IEnumerable.cs Removed unsafe from static class declaration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants