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:
parent
65f4b4329b
commit
07380e2fb3
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user