Skip to content

Commit

Permalink
small tweaks based on Cyrus' feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarolf committed Feb 23, 2017
1 parent 6a78772 commit f68b04c
Showing 1 changed file with 3 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ public bool TryParseReadonlyDictionary(IReadOnlyDictionary<string, object> allRa
if (allRawConventions.TryGetValue(KeyName, out object value))
{
result = _parseValue(value.ToString(), type);
if (result == null)
{
return false;
}
return true;
return result != null;
}
}
else if (_tryParseDictionary != null)
Expand All @@ -53,19 +49,11 @@ public EditorConfigStorageLocation(string keyName)
{
if (type == typeof(int))
{
if (int.TryParse(s, out var value))
{
return value;
}
return null;
return int.TryParse(s, out var value) ? (object)value : null;
}
else if (type == typeof(bool))
{
if (bool.TryParse(s, out var value))
{
return value;
}
return null;
return bool.TryParse(s, out var value) ? (object)value : null;
}
else if (type == typeof(CodeStyleOption<bool>))
{
Expand Down

0 comments on commit f68b04c

Please sign in to comment.