upgrade these for c#10

This commit is contained in:
CasualPokePlayer 2023-08-22 19:34:51 -07:00
parent 19443040c4
commit 1575949762
2 changed files with 3 additions and 5 deletions

View File

@ -13,8 +13,7 @@ namespace BizHawk.Bizware.Graphics
/// </summary>
public static class OpenGLVersion
{
// TODO: make this a ref struct once we're c# 10 (parameterless struct ctor)
private class SavedOpenGLContext : IDisposable
private readonly ref struct SavedOpenGLContext
{
private readonly IntPtr _sdlWindow, _glContext;

View File

@ -243,7 +243,7 @@ namespace BizHawk.Common
{
var uri = new Uri(path);
// gongshell supported shell schemes, although that seems complicated to support and very edge case, so not bothering for now --cpp
// this should be the only scheme used in practice
if (uri.Scheme != "file")
{
throw new NotSupportedException("Non-file Uri schemes are unsupported");
@ -264,8 +264,7 @@ namespace BizHawk.Common
ComInterface2 = (IContextMenu2)ComInterface;
}
// TODO: ref struct when c# 10
private class TempMenu : IDisposable
private ref struct TempMenu
{
[DllImport("user32.dll")]
private static extern IntPtr CreatePopupMenu();