Skip to content

Extent2D and Extent3D should implement IEquatable #2276

Open
@StefanPoelloth

Description

@StefanPoelloth

Summary of feature

Silk.NET.Vulkan.Extent2D and Silk.NET.Vulkan.Extent3D should implement IEquatable.

Comments

There might be other structs that would benefit from the implementation.

In my code I'm comparing 2 Silk.NET.Vulkan.Extent2D with currentSize.Equals(displaySize) to check if some resources should be recreated.
As a workaround i changed my code to compare the individual fields.

Output from resharper code inspection:

warning: Struct 'Extent2D' is checked for equality using the inefficient runtime-provided implementation
Default implementations of the 'Equals' and 'GetHashCode' methods of a struct are reflection-based and bad-performing

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy