From d3836a40ea9d63f2923813c3f01a0a8db333e496 Mon Sep 17 00:00:00 2001 From: Max Katz Date: Fri, 23 Dec 2022 09:47:56 -0500 Subject: [PATCH] Remove Lazy usage where it's not needed anymore --- src/Avalonia.Base/Platform/StandardRuntimePlatform.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Avalonia.Base/Platform/StandardRuntimePlatform.cs b/src/Avalonia.Base/Platform/StandardRuntimePlatform.cs index ddb492adcf..48fff4fc32 100644 --- a/src/Avalonia.Base/Platform/StandardRuntimePlatform.cs +++ b/src/Avalonia.Base/Platform/StandardRuntimePlatform.cs @@ -14,13 +14,13 @@ namespace Avalonia.Platform public IUnmanagedBlob AllocBlob(int size) => new UnmanagedBlob(size); - private static readonly Lazy Info = new(() => new RuntimePlatformInfo + private static readonly RuntimePlatformInfo s_info = new() { IsDesktop = OperatingSystemEx.IsWindows() || OperatingSystemEx.IsMacOS() || OperatingSystemEx.IsLinux(), IsMobile = OperatingSystemEx.IsAndroid() || OperatingSystemEx.IsAndroid() - }); + }; - public virtual RuntimePlatformInfo GetRuntimeInfo() => Info.Value; + public virtual RuntimePlatformInfo GetRuntimeInfo() => s_info; } }