Use the Value of Nullable<T> 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.
This commit is contained in:
CloneTrooper1019 2019-02-01 10:15:55 -06:00
parent 65f4b4329b
commit 07380e2fb3
3 changed files with 6 additions and 6 deletions

View File

@ -28,12 +28,12 @@ namespace Roblox.XmlFormat.PropertyTokens
public bool ReadToken(Property property, XmlNode token) public bool ReadToken(Property property, XmlNode token)
{ {
UDim? result = ReadUDim(token); UDim? result = ReadUDim(token);
bool success = (result != null); bool success = result.HasValue;
if (success) if (success)
{ {
property.Type = PropertyType.UDim; property.Type = PropertyType.UDim;
property.Value = result; property.Value = result.Value;
} }
return success; return success;

View File

@ -34,12 +34,12 @@ namespace Roblox.XmlFormat.PropertyTokens
public bool ReadToken(Property property, XmlNode token) public bool ReadToken(Property property, XmlNode token)
{ {
Vector2? result = ReadVector2(token); Vector2? result = ReadVector2(token);
bool success = (result != null); bool success = result.HasValue;
if (success) if (success)
{ {
property.Type = PropertyType.Vector2; property.Type = PropertyType.Vector2;
property.Value = result; property.Value = result.Value;
} }
return success; return success;

View File

@ -33,12 +33,12 @@ namespace Roblox.XmlFormat.PropertyTokens
public bool ReadToken(Property property, XmlNode token) public bool ReadToken(Property property, XmlNode token)
{ {
Vector3? result = ReadVector3(token); Vector3? result = ReadVector3(token);
bool success = (result != null); bool success = result.HasValue;
if (success) if (success)
{ {
property.Type = PropertyType.Vector3; property.Type = PropertyType.Vector3;
property.Value = result; property.Value = result.Value;
} }
return success; return success;