From 78dfe421064d354ed6ee7419879abe2d91919219 Mon Sep 17 00:00:00 2001 From: teascade Date: Mon, 8 May 2017 19:39:39 +0300 Subject: [PATCH] Fixed two warnings in SyncDB ~cleanup --- Assets/Scripts/SyncDB.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/SyncDB.cs b/Assets/Scripts/SyncDB.cs index 8a9f558..8c76716 100644 --- a/Assets/Scripts/SyncDB.cs +++ b/Assets/Scripts/SyncDB.cs @@ -45,11 +45,11 @@ public class SyncDB : MonoBehaviour { uint ID; try { ID = IDCounter++; - } catch (OverflowException Ex) { + } catch (OverflowException) { ID = 0; IDCounter = 1; } - while (Database.ContainsKey(ID) && Database.Keys.Count < uint.MaxValue && ID < uint.MaxValue) { + while (Database.ContainsKey(ID) && ID < uint.MaxValue) { ID++; if (ID < uint.MaxValue - 1) IDCounter = ID + 1; }