From b47abdb9a108c3e712e1df84cf97db98eaf3da2e Mon Sep 17 00:00:00 2001 From: Max Katz Date: Sat, 26 Feb 2022 05:04:53 -0500 Subject: [PATCH] Avoid nfloat in the codebase --- src/iOS/Avalonia.iOS/Extensions.cs | 3 +-- src/iOS/Avalonia.iOS/LayerFbo.cs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/iOS/Avalonia.iOS/Extensions.cs b/src/iOS/Avalonia.iOS/Extensions.cs index 819a1386e8..80f6b419c9 100644 --- a/src/iOS/Avalonia.iOS/Extensions.cs +++ b/src/iOS/Avalonia.iOS/Extensions.cs @@ -1,7 +1,6 @@ using System; using Avalonia.Media; using CoreGraphics; -using ObjCRuntime; using UIKit; namespace Avalonia.iOS @@ -13,7 +12,7 @@ namespace Avalonia.iOS public static Point ToAvalonia(this CGPoint point) => new Point(point.X, point.Y); - static nfloat ColorComponent(byte c) => ((float) c) / 255; + static float ColorComponent(byte c) => (float) c / 255; public static UIColor ToUiColor(this Color color) => new UIColor( ColorComponent(color.R), diff --git a/src/iOS/Avalonia.iOS/LayerFbo.cs b/src/iOS/Avalonia.iOS/LayerFbo.cs index bd05f3b852..955aaef59f 100644 --- a/src/iOS/Avalonia.iOS/LayerFbo.cs +++ b/src/iOS/Avalonia.iOS/LayerFbo.cs @@ -1,7 +1,6 @@ using System; using Avalonia.OpenGL; using CoreAnimation; -using ObjCRuntime; using OpenGLES; namespace Avalonia.iOS @@ -103,7 +102,7 @@ namespace Avalonia.iOS private readonly GlInterface _gl; private readonly CAEAGLLayer _layer; private LayerFbo _fbo; - private nfloat _oldLayerWidth, _oldLayerHeight, _oldLayerScale; + private double _oldLayerWidth, _oldLayerHeight, _oldLayerScale; public SizeSynchronizedLayerFbo(EAGLContext context, GlInterface gl, CAEAGLLayer layer) {