1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-09 23:15:40 +00:00

style: remove redundant else branches

This commit is contained in:
Oliver Booth 2023-04-01 22:01:07 +01:00
parent d7bf9d1788
commit b79435211a
No known key found for this signature in database
GPG Key ID: 20BEB9DC87961025

View File

@ -1,4 +1,4 @@
using System.Diagnostics.Contracts; using System.Diagnostics.Contracts;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Web; using System.Web;
@ -70,11 +70,9 @@ public static class DictionaryExtensions
return updated; return updated;
} }
else
{ dictionary.Add(key, addValue);
dictionary.Add(key, addValue); return addValue;
return addValue;
}
#endif #endif
} }
@ -126,11 +124,9 @@ public static class DictionaryExtensions
return updated; return updated;
} }
else
{ dictionary.Add(key, addValue);
dictionary.Add(key, addValue); return addValue;
return addValue;
}
} }
/// <summary> /// <summary>
@ -202,13 +198,11 @@ public static class DictionaryExtensions
return updated; return updated;
} }
else
{
var add = addValueFactory(key);
dictionary.Add(key, add);
return add; var add = addValueFactory(key);
} dictionary.Add(key, add);
return add;
#endif #endif
} }
@ -268,13 +262,11 @@ public static class DictionaryExtensions
return updated; return updated;
} }
else
{
var add = addValueFactory(key);
dictionary.Add(key, add);
return add; var add = addValueFactory(key);
} dictionary.Add(key, add);
return add;
} }
/// <summary> /// <summary>
@ -352,13 +344,11 @@ public static class DictionaryExtensions
return updated; return updated;
} }
else
{
var add = addValueFactory(key, factoryArgument);
dictionary.Add(key, add);
return add; var add = addValueFactory(key, factoryArgument);
} dictionary.Add(key, add);
return add;
#endif #endif
} }
@ -424,13 +414,11 @@ public static class DictionaryExtensions
return updated; return updated;
} }
else
{
var add = addValueFactory(key, factoryArgument);
dictionary.Add(key, add);
return add; var add = addValueFactory(key, factoryArgument);
} dictionary.Add(key, add);
return add;
} }
/// <summary> /// <summary>