From 07380e2fb3e32e02d28dc6c2b9158d1beb718c7e Mon Sep 17 00:00:00 2001 From: CloneTrooper1019 Date: Fri, 1 Feb 2019 10:15:55 -0600 Subject: [PATCH] Use the Value of Nullable for these XML properties. I was using a `T?` result for some of these values, and forgot to take their actual value if they aren't null. --- XmlFormat/PropertyTokens/UDim.cs | 4 ++-- XmlFormat/PropertyTokens/Vector2.cs | 4 ++-- XmlFormat/PropertyTokens/Vector3.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/XmlFormat/PropertyTokens/UDim.cs b/XmlFormat/PropertyTokens/UDim.cs index 6a227d9..80e2646 100644 --- a/XmlFormat/PropertyTokens/UDim.cs +++ b/XmlFormat/PropertyTokens/UDim.cs @@ -28,12 +28,12 @@ namespace Roblox.XmlFormat.PropertyTokens public bool ReadToken(Property property, XmlNode token) { UDim? result = ReadUDim(token); - bool success = (result != null); + bool success = result.HasValue; if (success) { property.Type = PropertyType.UDim; - property.Value = result; + property.Value = result.Value; } return success; diff --git a/XmlFormat/PropertyTokens/Vector2.cs b/XmlFormat/PropertyTokens/Vector2.cs index c0d7aca..a2995a9 100644 --- a/XmlFormat/PropertyTokens/Vector2.cs +++ b/XmlFormat/PropertyTokens/Vector2.cs @@ -34,12 +34,12 @@ namespace Roblox.XmlFormat.PropertyTokens public bool ReadToken(Property property, XmlNode token) { Vector2? result = ReadVector2(token); - bool success = (result != null); + bool success = result.HasValue; if (success) { property.Type = PropertyType.Vector2; - property.Value = result; + property.Value = result.Value; } return success; diff --git a/XmlFormat/PropertyTokens/Vector3.cs b/XmlFormat/PropertyTokens/Vector3.cs index 2918bac..76bd704 100644 --- a/XmlFormat/PropertyTokens/Vector3.cs +++ b/XmlFormat/PropertyTokens/Vector3.cs @@ -33,12 +33,12 @@ namespace Roblox.XmlFormat.PropertyTokens public bool ReadToken(Property property, XmlNode token) { Vector3? result = ReadVector3(token); - bool success = (result != null); + bool success = result.HasValue; if (success) { property.Type = PropertyType.Vector3; - property.Value = result; + property.Value = result.Value; } return success;