mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Remove unnecessary null check
Split function always return array. If you look at the source of it, it even guarantees it with code contracts
This commit is contained in:
parent
d4b050148b
commit
d7d3ce4fc1
2 changed files with 4 additions and 4 deletions
|
@ -41,7 +41,7 @@ public static XElement GetNode(this XContainer element, string path)
|
|||
|
||||
string[] splitPath = path.Split('/');
|
||||
|
||||
if (splitPath != null && splitPath.Length > 0)
|
||||
if (splitPath.Length > 0)
|
||||
{
|
||||
foreach (string name in splitPath)
|
||||
{
|
||||
|
|
|
@ -90,7 +90,7 @@ public string Login(string email, string password)
|
|||
{
|
||||
string[] values = response.Split(',');
|
||||
|
||||
if (values != null && values.Length > 1)
|
||||
if (values.Length > 1)
|
||||
{
|
||||
int status;
|
||||
|
||||
|
@ -119,7 +119,7 @@ public bool DeleteFile(string id)
|
|||
{
|
||||
string[] lines = response.Lines();
|
||||
|
||||
if (lines != null && lines.Length > 0)
|
||||
if (lines.Length > 0)
|
||||
{
|
||||
int status;
|
||||
|
||||
|
@ -144,7 +144,7 @@ public override UploadResult Upload(Stream stream, string fileName)
|
|||
{
|
||||
string[] values = result.Response.Split(',');
|
||||
|
||||
if (values != null && values.Length > 0)
|
||||
if (values.Length > 0)
|
||||
{
|
||||
int status;
|
||||
|
||||
|
|
Loading…
Reference in a new issue