Removed inlined out variables from PropertyConditional. Didn't realize this was a C# 7 only feature.
This commit is contained in:
@@ -119,7 +119,8 @@ namespace Barotrauma
|
|||||||
switch (Type)
|
switch (Type)
|
||||||
{
|
{
|
||||||
case ConditionType.PropertyValue:
|
case ConditionType.PropertyValue:
|
||||||
if (target.SerializableProperties.TryGetValue(PropertyName.ToLowerInvariant(), out SerializableProperty property))
|
SerializableProperty property;
|
||||||
|
if (target.SerializableProperties.TryGetValue(PropertyName.ToLowerInvariant(), out property))
|
||||||
{
|
{
|
||||||
return Matches(property);
|
return Matches(property);
|
||||||
}
|
}
|
||||||
@@ -194,7 +195,8 @@ namespace Barotrauma
|
|||||||
float? floatProperty = null;
|
float? floatProperty = null;
|
||||||
if (type == typeof(float) || type == typeof(int))
|
if (type == typeof(float) || type == typeof(int))
|
||||||
{
|
{
|
||||||
if (Single.TryParse(Value, NumberStyles.Float, CultureInfo.InvariantCulture, out float parsedFloat))
|
float parsedFloat;
|
||||||
|
if (Single.TryParse(Value, NumberStyles.Float, CultureInfo.InvariantCulture, out parsedFloat))
|
||||||
{
|
{
|
||||||
floatValue = parsedFloat;
|
floatValue = parsedFloat;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user