Fixed two warnings in SyncDB ~cleanup

This commit is contained in:
Sofia 2017-05-08 19:39:39 +03:00
parent 1f49f6a6f0
commit 78dfe42106

View File

@ -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;
}