Fixes more casting

This commit is contained in:
Kamron Batman 2018-09-09 08:03:01 -07:00
parent aba9452161
commit 74f498c1c8
17 changed files with 581 additions and 805 deletions

View file

@ -45,10 +45,8 @@ namespace Server {
if ( obj == null )
return 1;
RegionRect regRect = obj as RegionRect;
if ( regRect == null )
throw new ArgumentException( "obj is not a RegionRect", "obj" );
if ( !(obj is RegionRect regRect) )
throw new ArgumentException( "obj is not a RegionRect", nameof(obj) );
return ( ( IComparable ) m_Region ).CompareTo( regRect.m_Region );
}
@ -316,4 +314,4 @@ namespace Server {
}
}
}
}
}