1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-22 19:58:49 +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.Web;
@ -70,11 +70,9 @@ public static class DictionaryExtensions
return updated;
}
else
{
dictionary.Add(key, addValue);
return addValue;
}
dictionary.Add(key, addValue);
return addValue;
#endif
}
@ -126,11 +124,9 @@ public static class DictionaryExtensions
return updated;
}
else
{
dictionary.Add(key, addValue);
return addValue;
}
dictionary.Add(key, addValue);
return addValue;
}
/// <summary>
@ -202,13 +198,11 @@ public static class DictionaryExtensions
return updated;
}
else
{
var add = addValueFactory(key);
dictionary.Add(key, add);
return add;
}
var add = addValueFactory(key);
dictionary.Add(key, add);
return add;
#endif
}
@ -268,13 +262,11 @@ public static class DictionaryExtensions
return updated;
}
else
{
var add = addValueFactory(key);
dictionary.Add(key, add);
return add;
}
var add = addValueFactory(key);
dictionary.Add(key, add);
return add;
}
/// <summary>
@ -352,13 +344,11 @@ public static class DictionaryExtensions
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
}
@ -424,13 +414,11 @@ public static class DictionaryExtensions
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>