Code cleanup (#188)

This commit is contained in:
Kamron Batman 2020-08-01 08:40:06 -07:00 committed by GitHub
parent df53c16620
commit 010fd9402a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
185 changed files with 1052 additions and 1271 deletions

View file

@ -183,12 +183,7 @@ namespace Server
get => m_Base;
set
{
if (value < 0)
value = 0;
else if (value >= 0x10000)
value = 0xFFFF;
var sv = (ushort)value;
var sv = (ushort)Math.Clamp(value, 0, 0xFFFF);
int oldBase = m_Base;
@ -219,12 +214,7 @@ namespace Server
get => m_Cap;
set
{
if (value < 0)
value = 0;
else if (value >= 0x10000)
value = 0xFFFF;
var sv = (ushort)value;
var sv = (ushort)Math.Clamp(value, 0, 0xFFFF);
if (m_Cap != sv)
{